Sending email from Oracle Forms with attachments

Hi,
Is there any package or option available in Oracle forms to send email with attachments?
Your reply will be highly appreciated.
Regds,
noneda

There are a couple of ways to send email (with attachements) from Oracle Forms. Check out these links to some examples.
using OLE2 or CLIENT_OLE2 to access a mail-client via Mail-Api ( Get and set Outlook properties )
using MAILTO in conjunction with HOST or CLIENT_HOST to "start" a mail-client ( Re: Open Microsoft Outlook new massage with TO containing the email address )
using UTL_SMTP for database-side-mailing ( Re: Send mail with attachment )
Hope this helps,
Craig...

Similar Messages

  • How to sending email from Oracle Forms

    How to sending email from Oracle 6i(Forms)
    I need to send email to a distribution list(multiple email addresses).

    send email of multiple email address
    [email protected],[email protected],[email protected]
    create or replace function mailout
    (sender in varchar2,
    recipient in varchar2,
    ccrecipient in varchar2,
    subject in varchar2,
    message in varchar2) return number
    is
    crlf varchar2(2) := chr(13)||chr(10);
    connection utl_smtp.connection;
    mailhost varchar2(50) := 'Add email server Ip Address here';
    header varchar2(4000);
    v_num number :=1;
    str number:=0;
    email varchar2(50);
    begin
    connection := utl_smtp.open_connection(mailhost,25);
    header := 'Date: '||to_char(sysdate,'dd mon yy hh24:mi:ss')||crlf||
    'From: '||sender||' '||crlf||
    'Subject: '||subject||crlf||
    'To: '||recipient||crlf||
    'Cc: '||ccrecipient||crlf||message;
    utl_smtp.helo(connection,mailhost);
    utl_smtp.mail(connection,sender);
    utl_smtp.rcpt(connection,recipient);
    while (instr(ccrecipient,',',1,v_num)>0) loop
    email:=substr(ccrecipient,str+1,instr(ccrecipient,',',1,v_num)-str-1);
    dbms_output.put_line(email);
    utl_smtp.rcpt(connection,email);
    str:=instr(ccrecipient,',',1,v_num);
    v_num:=v_num+1;
    end loop;
    utl_smtp.open_data(connection);
    -- utl_smtp.write_data(connection,header);
    utl_smtp.write_data(connection,'MIME-Version:1.0'||crlf||'Content-type:text/html'||crlf||header);
    utl_smtp.close_data(connection);
    utl_smtp.quit(connection);
    return 0;
    exception
    when utl_smtp.invalid_operation then
    dbms_output.put_line('Invalid Operation in SMTP transaction');
    return 1;
    when utl_smtp.transient_error then
    dbms_output.put_line('Temporary problem with sending email ');
    return 2;
    when utl_smtp.permanent_error then
    dbms_output.put_line('Permanent problem with sending email ');
    return 3;
    end;

  • Sending email from oracle forms

    Hi, I want to send an email within oracle forms 10g.
    If anyone could help me.
    Thanks.

    Hi,
    I didn't understand.....
    Isn't it convienient to you , to create a button , for example , and call the UTL_MAIL.SEND(......<parameters given in text items of your form>......) buolt in procedure....????? or the equivalent procedure in UTL_SMTP ....????
    Regards,
    Simon

  • How to sending email from Oracle 6i(Forms)

    How can I send email from Oracle Forms(6i).
    I need to send email to a distribution list(multiple email addresses).

    send email of multiple email address
    [email protected],[email protected],[email protected]
    create or replace function mailout
    (sender in varchar2,
    recipient in varchar2,
    ccrecipient in varchar2,
    subject in varchar2,
    message in varchar2) return number
    is
    crlf varchar2(2) := chr(13)||chr(10);
    connection utl_smtp.connection;
    mailhost varchar2(50) := 'Add email server Ip Address here';
    header varchar2(4000);
    v_num number :=1;
    str number:=0;
    email varchar2(50);
    begin
    connection := utl_smtp.open_connection(mailhost,25);
    header := 'Date: '||to_char(sysdate,'dd mon yy hh24:mi:ss')||crlf||
    'From: '||sender||' '||crlf||
    'Subject: '||subject||crlf||
    'To: '||recipient||crlf||
    'Cc: '||ccrecipient||crlf||message;
    utl_smtp.helo(connection,mailhost);
    utl_smtp.mail(connection,sender);
    utl_smtp.rcpt(connection,recipient);
    while (instr(ccrecipient,',',1,v_num)>0) loop
    email:=substr(ccrecipient,str+1,instr(ccrecipient,',',1,v_num)-str-1);
    dbms_output.put_line(email);
    utl_smtp.rcpt(connection,email);
    str:=instr(ccrecipient,',',1,v_num);
    v_num:=v_num+1;
    end loop;
    utl_smtp.open_data(connection);
    -- utl_smtp.write_data(connection,header);
    utl_smtp.write_data(connection,'MIME-Version:1.0'||crlf||'Content-type:text/html'||crlf||header);
    utl_smtp.close_data(connection);
    utl_smtp.quit(connection);
    return 0;
    exception
    when utl_smtp.invalid_operation then
    dbms_output.put_line('Invalid Operation in SMTP transaction');
    return 1;
    when utl_smtp.transient_error then
    dbms_output.put_line('Temporary problem with sending email ');
    return 2;
    when utl_smtp.permanent_error then
    dbms_output.put_line('Permanent problem with sending email ');
    return 3;
    end;

  • Live Demo of sending SMS from Oracle Forms.

    I've just a posted a live demo of how to develop code to call a web service to send and SMS from Oracle Forms.
    Regards
    Grant
    http://otn.oracle.com/formsdesignerj2ee
    http://groundside.com/blog/GrantRonald?title=live_demo_of_sending_an_sms_from_forms&more=1&c=1&tb=1&pb=1

    Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>Announcement: Forums Etiquette / Reward Points
    </ul>
    Do anybody know about sending the sms from oracle forms.If anybody had means please send me the script...... This is a commonly asked question. Have you tried searching the forum for possible solutions? Take a look at this search result. I would also recommend you take a look at the Oracle Forms Services 11g web page and scroll down to the Oracle Forms 11g calling a web service link. This is a white paper published by Grant Ronald that specifically describes the process of sending SMS from Oracle Forms.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • ACL error when sending email from Oracle 11g

    Hi,
    It returned something like "error...ACL security" when I tried to send email from Oracle 11g. Is there any security thing that I need to release in Oracle 11g? I used to send emails from Oracle 10g and didn't find any problem.
    Thanks.
    Andy

    In Database 11g Oracle introduced Network Access Control Lists (ACLs) to protect the database from users using the many internet-capable packages such as UTL_INADDR, UTL_HTTP, UTL_TCP, etc.
    Read all about it in the docs and look at the code demos here:
    http://www.morganslibrary.org/library.html
    under DBMS_NETWORK_ACL_...

  • Email from Oracle Forms Server/10gAS

    I know we can use DB SMTP package to send email from DB. But we like to send emails along with attachments from Oracle Forms/10gAS server.
    What is the best solution that is available? Any options in WebUtil in Oracle Forms?
    Thanks

    Hi,
    I'm doing a similar kind of thing on our app server. We're using WebUtil to interact with the client outlook (either that or install Outlook on the app server machine). Forms is controlling the email software.
    Oracle does have a white paper on this something to do with MAPI sessions but it was so long ago that I did this that I can't remember.
    Hopefully this will help you somewhat
    L :-)

  • Send email from oracle

    Dear member & developers
    I want to send e mail from oracle application. If anybody knows, how to do this. please write or send a sample application or forms or database sql. I don't restricted to any application version like 10g or 11g same as database...
    I seriously need it.
    Thanks in Advanced.

    As Francois indicated - there are multiple examples around the internet and in the forums. Any email solution you choose is going to require that you have access to a valid email server (SMTP, POP3, etc). Also, the solution is dependent on "Where" you want to send the email from. I prefer a database solution because this makes it available to your entire database application, but you can use a Java email method (using Forms PJC or Java Bean) or you can OLE link to Microsoft Outlook.
    Take a look at Send Email from the Database. I wrote this package based on the DEMO_MAIL package provided by Oracle (via OTN) and stream line things a bit. There is an example of how to use the package in the article.
    Take a look at Send email with HTML body and local file attachements article on Franscois's web site for an example of sending email from an Oracle Form using Java.
    If you need to use Outlook - search the forum. I don't consider this to be a reasonable method so I don't use it or recommend it. I'm sure it works fine for others, I just think being dependent on a application installed on the client is not a solid solution. That's just my opinion. ;-)
    I search through out the net. Didn't get any tutorial video or any working materiel. I disagree with this statement - I did a quick Google search and found many examples (no videos) and demo's.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Sending email from Oracle through Lotus Domino Server

    Hi,
    I would like to know whether it is possible to send an email from Oracle through a Lotus Domino Server(acting as mail server). If yes, please provide me with the details.
    Thanks in advance

    Have a look at the database UTL_SMTP package

  • Send email from oracle xe table

    Hi, just a question, does any one know if oracle has any built in email functionality ?
    I have an oracle xe table with email addresses in it, I want to send emails using the addresses.
    Yes I know I can connect to it with many things and send emails, but I was wondering if there is any way to send directly from oracle ?

    Jay wrote:
    Hi, just a question, does any one know if oracle has any built in email functionality ?
    I have an oracle xe table with email addresses in it, I want to send emails using the addresses.
    Yes I know I can connect to it with many things and send emails, but I was wondering if there is any way to send directly from oracle ?They do, it's outlined in the documentation (i assume you're using XE).
    http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/wrkspc.htm#HTMDB08010

  • Cannot send email from iPad & iPhone with Virgin Media

    I cannot send emails from my iPad and iPhone. I have a virginmedia.com address and I can receive but just cannot send. A message keeps saying the smpt settings are wrong. However, I have followed the tutorial on Virgin Media web site (this is how I managed to start receiving emails on my devices) but still not sending. I have looked at the settings in my MacBook Pro and all seem to be correct. Does anyone have an idea what could be wrong? I had a similar problem when I loaded Microsoft Office 365 for Mac; I had to end up calling Virgin Media (useless) and then Microsoft (useful). Anyhow I have looked at the settings on the Mac and they all seem to correspond with the ipad and iphone but still cannot send emails. V V Frustrated.
    Thanks for reading.

    Then make sure that the settings are correct in your email account.
    Check the outgoing mail server setting. Make sure that your username and password are in there.
    Settings>Mail, Contacts, Calendars>Your email account>Account>Outgoing mail server - tap the server name next to SMTP and check in the primary server and make sure your username and password are entered and correct - even if it says that the password is optional.

  • Calling a procedure from Oracle Forms with OUT parameter

    HI,
    Can anyone tell me in detail how to call a procedure with OUT parameters from Oracle Forms 6i ?
    Thanks in advance.

    Hello,
    Just provide the out parameter in the call:
    Declare
      amount   number; -- OUT number argument populated by the procedure
    Begin
      -- call the X procedure --
      x( amount ) ;
    End;Francois

  • Sending email from oracle

    Hi all
    I have a requirement to send emails to managers internal to the company from oracle whenever the orders placed by customers are not acknowleded in certian time like within 6 hrs or so.I could figure out the logic but dont know how to send an email from oracle.
    my logic:
    creating a job which will be scheduled to run every 4 or 5 hrs.this job runs a stored procedure which does all the logic and sends an email.
    any suggesions or source is greatly appreciated.
    thanks and regards in advance
    yugandhar

    Hi,
    for scheduling a job use dbms_job package and to send emails use utl_smtp package is available oracle 8.1.6 and above hope this helps you
    prem

  • Send email using Oracle Forms 6i through Outlook Express

    I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending single client at a time while using Oracle Forms 6i through Outlook Express?
    To do this I have written the following code.
    PROCEDURE send_mail IS
    OutlookApp OLE2.OBJ_TYPE;
    NameSpace OLE2.OBJ_TYPE;
    MailItem OLE2.OBJ_TYPE;
    OLEPARAM OLE2.LIST_TYPE;
    Send OLE2.OBJ_TYPE;
    Attachments OLE2.OBJ_TYPE;
    Attachment_dummy OLE2.OBJ_TYPE;
    var1 varchar2(1000);
    Begin
    var1 := :mapiole.message;
    OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,'MAPI');
    NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,0);
    MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLE2.SET_PROPERTY(MailItem,'To',:to);
    OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
    OLE2.SET_PROPERTY(MailItem,'Body', var1);
    --add an attachment
    if :mapiole.attach is not null then
    Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,:attach);
    Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    end if;
    Send := OLE2.INVOKE_OBJ(MailItem,'Send');
    --destroy objects
    OLE2.RELEASE_OBJ(MailItem);
    OLE2.RELEASE_OBJ(NameSpace);
    OLE2.RELEASE_OBJ(OutlookApp);
    END;
    Create a block called MAPIOLE with the following canvas layout:
    To:      ============================
    Subject: ============================
    Message: ============================
    ============================
    Attachment: ============================           SEND      
    When I press the SEND button then
    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    How can I do this?
    When I use Microsoft Outlook 2003 It works fine.
    Please help me.
    Thanks.

    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    hi
    plz if there is any attach library recompile it or open the pll and compile it with ctrl+shift+k and ctrl+t.
    sarah

  • Send email using Oracle Forms 6i through MS Outlook 2003

    I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending to clients while using Oracle Forms 6i through Microsoft Outlook 2003?
    To do this I have written the following code.
    PROCEDURE send_mail IS
    OutlookApp OLE2.OBJ_TYPE;
    NameSpace OLE2.OBJ_TYPE;
    MailItem OLE2.OBJ_TYPE;
    OLEPARAM OLE2.LIST_TYPE;
    Send OLE2.OBJ_TYPE;
    Attachments OLE2.OBJ_TYPE;
    Attachment_dummy OLE2.OBJ_TYPE;
    var1 varchar2(1000);
    Begin
    var1 := :mapiole.message;
    OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,'MAPI');
    NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLEPARAM := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(OLEPARAM,0);
    MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
    OLE2.DESTROY_ARGLIST(OLEPARAM);
    OLE2.SET_PROPERTY(MailItem,'To',:to);
    OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
    OLE2.SET_PROPERTY(MailItem,'Body', var1);
    --add an attachment
    if :mapiole.attach is not null then
              Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
              OLEPARAM := OLE2.CREATE_ARGLIST;
              OLE2.ADD_ARG(OLEPARAM,:attach);
              Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
              OLE2.DESTROY_ARGLIST(OLEPARAM);
    end if;
    Send := OLE2.INVOKE_OBJ(MailItem,'Send');
    --destroy objects
    OLE2.RELEASE_OBJ(MailItem);
    OLE2.RELEASE_OBJ(NameSpace);
    OLE2.RELEASE_OBJ(OutlookApp);
    END;
    Create a block called MAPIOLE with the following canvas layout:
    || To: |============================|
    |
    | Subject: |============================|
    |
    | Message: |============================ |
    |============================|
    | Attachment: |============================| |SEND | |
    When I press the SEND button then
    Microsoft Office Outlook window open containing the message below.
    A program is trying to automatically send e-mail on your behalf.
    Do you want to allow this?
    If this is unexpected,it may be a virus and you should choose "No".
    Yes No Help Button are there.
    If choose No then
    Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    else Message send successfully.
    I want not to open Outlook Message window and message automatically send to given email id.
    How can I do this?
    Please help me.
    Thanks.

    Try disable warnings:
    Visual Basic 6 (VBA)
    OlSecurityManager.ConnectTo OutlookApp
    OlSecurityManager.DisableOOMWarnings = True
    On Error Goto Finally
    '... any action with protected objects ...
    Finally:
    OlSecurityManager.DisableOOMWarnings = False
    If you find correct syntax with OLE2 post your code ;)

Maybe you are looking for

  • Sql: group by/ having

    Hi, I have the follwoing table: agt relationship startdate enddate 9000 83 1/23/04 2/23/34 9000 83 3/23/01 3/3/06 9000 83 7/4/08 5/5/05 9002 34 4/4/05 4/3/08 9002 23 4/4/05 2/2/06 9002 23 6/6/06 7/7/06 I would like to write a query which tells me if

  • Index at end of Book

    I am putting together a book. InDesign is all new to me. I can't find any info on how to create an index at the end of the book.

  • How do I stop the "Confirm Dialog Preference" box from appearing everytime I load a page?!

    Every time I a go to a new page, whether it is the same site or not, I get a dialog box that appears that reads "Confirm Dialog Preference," and the options include yes or no. How do I get this to stop? It is really, really annoying.

  • Best way to update an indicator

    I've attached a very simple vi to demonstrate my question. I'm making a test using the state-machine architecture. In the test, there is an indicator on the front panel which is to be updated at various places in the test. My question is ... what is

  • Lowest Grain of Financials Analytics vs. Data in EBS? - For Not EBS Experts

    Guys, any person has some non-super techie or non-super EBS export answer to my following question: What is the "Lowest Grain of Financials Analytics vs. Data in EBS?" For a vanilla install, what lowest level of AP, AR, GL types of information that w