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;

Similar Messages

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

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

  • 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

  • Howe to send sms from oracle forms

    i need your help plzz i wana to send sms from my applicatin

    in normal case you will need an provider for sending sms (pswin,clickatell...) and the easiest way send sms is with a http-api, provided by most of these providers.
    You can do the http-request in forms, by using web.show_document or webutil or, that is the method i prefer put it in the database and let a stored procedure handle the sms-sending. Here is a example of using such an api:
    url := 'http://xxx.xxx.com/send/?typ=2&from=mecker&to='
    || UTL_URL.escape(vMobileNo, true, 'ISO-8859-1')
    || '&txt=' || UTL_URL.escape(vMessageText, true, 'ISO-8859-1')
    ||'&id=myaccount&pwd=testpw&autoroute=1';
    UTL_HTTP.SET_TRANSFER_TIMEOUT(120);
    resp_pieces := utl_http.request_pieces(url);
    for i in 1..resp_pieces.count loop
    value := value || resp_pieces(i);
    end loop;
    There is another example on the pswin homepage at:
    http://www.pswin.com/_pswincom/Downloads/SMS_UTIL.PKS.txt
    I am also sending SMS with unicode, a little bit more complex, if you need unicode-characters let me know ([email protected]), i will give you an example.

  • How to send emails from of pdf's generated by oracle reports

    I have several pdf documents , I want to email those pdf's . Please let me know how to send emails from oracle reports .
    Thanks,
    Previn

    I have integrated Oracle Reports with Oracle Portal and used the scheduling feature via portlets. We have reports that run every monday morning for management. For more info go to:
    http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
    OR
    I think if you set destype=mail, desformat=PDF, and desname=[email protected] that should also do the trick.
    Just be sure that you have put your mail server's IP address in the rep_<machine_name>.conf file located in your <oracle_home>/reports/conf directory. If this is not set up, the mail feature won't work.
    Martin

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

  • How to send emails from HANA SQL Console

    Hi,
    Please guide how  to send mail from HANA Studio SQL Console.
    Is there any standard procedure in Hana Studio to send Mail( e.g. in MS SQL  "sp_send_dbmail" Procedure)

    Hi Preethi,
    Please go through the attached link:
    How to send emails from HANA
    Regards,
    Krishna

  • How to Send SMS from Oracle Database to Mobile

    Hi All,
    I need urgent help in how to send sms from oracle database to mobile
    thanks and best regards

    you can use smslib..... . i have made a program with this. its working fine with oracle database.
    see the links here ...
    http://halimdba.blogspot.com/2011/08/send-sms-from-oracle-database-with.html
    by the way, how you can say "urgent help" ?
    regards
    Halim

  • How to send sms from oracle application to cell phone

    Hi all
    please send me in how to send sms from oracle application to cell phone. Is there any way to solve this task. if so please suggest me.

    Please see old threads for similar discussion -- http://forums.oracle.com/forums/search.jspa?threadID=&q=SMS&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • How to send BusinessEvent from oracle EBS 12 to an external JMS Queue/Topic

    Hello Sir:
    How to send BusinessEvent from oracle EBS 12 to an external JMS Queue/Topic??
    How to receive BusinessEvent from an external JMS Queue/Topic to oracle EBS 12 ??
    It is a Third Party JMS Server, it has queue and topic etc??
    which module should be used??
    what is the basic steps to do??
    Thanks

    swapnil_yeole wrote:
    Hello,
    We want to install Oracle EBS 12.1.1.
    Our internet speed is very poor so it would not be feasible for us to download the software from E-delivery site.
    Can you please let me know how & where to obtain Oracle EBS 12.1.1 DVD's.
    Do we need to raise an SR with Oracle for same.
    Thanks in advance.
    Yes -- https://blogs.oracle.com/stevenChan/entry/how_to_obtain_media_packs
    Thanks,
    Hussein

  • Help: how to send emails from FORMS?

    Are there simple steps to send emails from FORMS?
    Thank you in advance.
    Jimmy

    I'm sure there are many ways to send emails from Forms. Personally I never had to do this, but I can imagine following ways.
    a) use UTL_SMTP-Package to send the email via your database
    b) use a Java-Call
    Peter

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

Maybe you are looking for