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

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 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...

  • 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

  • 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

  • Sending email from web forms (Forms 6i)

    Does anyone know how to send email using Outlook from web forms? I can get it working with client server but not with web forms.
    Thanks,
    Darcea Klein
    null

    Many ways to send a email:
    1. use Web.Show_Document(v_url, '_blank') to call a .asp or .php or .cgi page which can send email, attaching some message.
    2. use utl_smtp built_in in Oracle 8i, you can save this procedure in database, then call this procedure in your web form.
    PROCEDURE SEND_EMAIL (sender IN VARCHAR2,
    recipient IN VARCHAR2,
    message IN VARCHAR2)
    IS
    mailhost VARCHAR2(30) := 'smtp.aaaaa.com';
    mail_conn utl_smtp.connection;
    BEGIN
    mail_conn := utl_smtp.open_connection(mailhost, 25);
    utl_smtp.helo(mail_conn, mailhost);
    utl_smtp.mail(mail_conn, sender);
    utl_smtp.rcpt(mail_conn, recipient);
    utl_smtp.data(mail_conn, message);
    utl_smtp.quit(mail_conn);
    -- Handle the error
    END;
    GOOD LUCK

  • 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 ;)

  • Sending email from a form (runtime)

    Hi otn,
    I wanna send an email with a text file attached from a form at run time mode.
    can u help ?
    Thank u

    HERE IS CODE :
    PROCEDURE kr_sendmail(
    p_mail_subject IN VARCHAR2
    ,p_mail_to                IN VARCHAR2
    ,p_mail_cc                IN VARCHAR2 DEFAULT NULL
    ,p_mail_bcc           IN VARCHAR2 DEFAULT NULL
    ,p_mail_body           IN VARCHAR2 DEFAULT NULL
    ,p_attachment_source      IN VARCHAR2 DEFAULT NULL
    ,p_attachment_name           IN VARCHAR2 DEFAULT NULL
    ,p_display                IN BOOLEAN DEFAULT TRUE
    ,p_cisoe_id IN NUMBER DEFAULT 0
    ,pio_entry_id IN OUT VARCHAR2)
    IS
    c_cisoe_id               CONSTANT VARCHAR2
    (30) := 'CISOEMAILID';
    objArgL                         
         OLE2.OBJ_TYPE;
    objAppOutlook           OLE2.OBJ_TYPE;
    objNameSpace                OLE2.OBJ_TYPE;
    objInBox                          OLE2.OBJ_TYPE;
    --objFolders                     OLE2.OBJ_TYPE;
    --objFolder                     OLE2.OBJ_TYPE;
    objMailItem                    OLE2.OBJ_TYPE;
    objAttachments          OLE2.OBJ_TYPE;
    objAttachment               OLE2.OBJ_TYPE;
    objUserProperties     OLE2.OBJ_TYPE;
    objUserProperty          OLE2.OBJ_TYPE;
    v_id_new                     VARCHAR2(2000);
    v_id_folder           VARCHAR2(2000);
    v_cisoe_id               NUMBER;
    v_test BOOLEAN;
    BEGIN
         -- Create Outlook Application Object
    objAppOutlook := ole2.create_obj('Outlook.Application');
    -- Get Namespace
    objArgL := ole2.create_arglist;
    ole2.add_arg(objArgL,'MAPI');
    objNameSpace := ole2.invoke_obj
    (objAppOutlook,'GetNamespace',objArgL);
    ole2.destroy_arglist(objArgL);
    -- Get InBox-Folder (Posteingang)
    objArgL := ole2.create_arglist;
    ole2.add_arg(objArgL,6);
    objInBox := ole2.invoke_obj
    (objNameSpace,'GetDefaultFolder',objArgL);
    ole2.destroy_arglist(objArgL);
    -- Create MailItem with properties
    objArgL := ole2.create_arglist;
    ole2.add_arg(objArgL,0);
    objMailItem := ole2.invoke_obj
    (objAppOutlook,'CreateItem',objArgL);
    ole2.destroy_arglist(objArgL);
    ole2.set_property(objMailItem,'To', p_mail_to);
    ole2.set_property(objMailItem,'CC', p_mail_cc);
    ole2.set_property(objMailItem,'BCC',p_mail_bcc);
    ole2.set_property(objMailItem,'Subject',p_mail_subject);
    ole2.set_property(objMailItem,'Body',p_mail_body);
    --Test p_attachment_source
    IF p_attachment_source IS NOT NULL THEN -- Create Attachment
    --Test exist File
    v_test := kr$fexists(p_attachment_source);
    IF v_test = FALSE THEN --NOT TEXT_IO.IS_OPEN(v_test) THEN
    --qms$errors.show_message(p_mesg=>'CKR-00022',p_param1 =>
    1);
    MESSAGE('Datei '||p_attachment_source||' ist nicht
    existieren !');
    RETURN;
    ELSE
    -- Create Attachment
    objAttachments := ole2.get_obj_property
    (objMailItem,'Attachments');
    objArgL := ole2.create_arglist;
    ole2.add_arg(objArgL,p_attachment_source);
    ole2.add_arg(objArgL,1);                     --
    property type
    ole2.add_arg(objArgL,1);                     --
    property position
    ole2.add_arg(objArgL,p_attachment_name);     -- property name
    objAttachment := ole2.invoke_obj
    (objAttachments,'Add',objArgL);
    ole2.destroy_arglist(objArgL);
    END IF;
    END IF;
    -- Create User Property
    objUserProperties := ole2.get_obj_property
    (objMailItem,'UserProperties');
    objArgL := ole2.create_arglist;
    ole2.add_arg(objArgL,c_cisoe_id); -- property name
    ole2.add_arg(objArgL,3);                     
         -- property type (number)
    objUserProperty := ole2.invoke_obj
    (objUserProperties,'Add',objArgL);
    ole2.destroy_arglist(objArgL);
    -- Set User Property
    ole2.set_property(objUserProperty,'Value',p_cisoe_id);
    -- Save
    ole2.invoke(objMailItem,'Save');
    -- Get Entry ID
    v_id_new := ole2.get_char_property(objMailItem,'EntryID');
    pio_entry_id := v_id_new;
    -- Get User Property
    v_cisoe_id := ole2.get_num_property(objUserProperty,'Value');
    -- Create new Folder in InBox
    -- objFolders := ole2.invoke_obj(objInBox,'Folders');
    -- objArgL := ole2.create_arglist;
    -- ole2.add_arg(objArgL,'MyFolder');
    -- objFolder := ole2.invoke_obj(objFolders,'Add',objArgL);
    -- ole2.destroy_arglist(objArgL);
    -- Display Folder
    -- ole2.invoke(objFolder,'Display');
    -- Move Mail to new Folder
    objArgL := ole2.create_arglist;
    ole2.add_arg_obj(objArgL,objInbox); --objFolder);
    ole2.invoke(objMailItem,'Move',objArgL);
    ole2.destroy_arglist(objArgL);
    v_id_folder := ole2.get_char_property(objMailItem,'EntryID');
    -- Display or send
    IF p_display
    THEN
    ole2.invoke(objMailItem,'Display');
    ELSE
    ole2.invoke(objMailItem,'Send');
    END IF;
    -- Release objects
    ole2.release_obj(objUserProperty);
    ole2.release_obj(objUserProperties);
    --Test p_attachment_source
    IF p_attachment_source IS NOT NULL THEN -- Create Attachment
    ole2.release_obj(objAttachment);
    ole2.release_obj(objAttachments);
    END IF;
    ole2.release_obj(objMailItem);
    --ole2.release_obj(objFolder);
    --ole2.release_obj(objFolders);
    ole2.release_obj(objInBox);
    ole2.release_obj(objNameSpace);
    ole2.release_obj(objAppOutlook);
    END kr_sendmail;

Maybe you are looking for