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;

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;

  • 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

  • Send Email from approval task form

    In my reusable workflow, I have added an approval action. Everything works perfectly. What I want is - When approver comes to approval form, he should be able to send notification email to the initiator (From that form) that he has started working on that document.
    What I have tried - I have added a button clicking on which will submit the form to initiator. 
    But it fails. possible reason - when I create a data connection in workflow's infopath form to submit form as email, I am getting following warning
    "Domain trust form templates cannot be sent as email attachments. to fix this problem, modify the form option to change the security level of form template to restricted".
    I also tried to update status field and wait for it to changes in workflow and send an email from sp designer workflow. it didn't work.
    Please help or suggest any other possible way to achieve this functionality (Send Email from approval task form to initiator).

    Hi mry,
    I could reproduce on my SharePoint 2013 on-premise based on your another
    post.
    Based on the the following article, SharePoint workflow cannot use the InfoPath form in restricted mode which doesn't allow the data connection, but as your image warning message shows sending InfoPath form as mail attachments will need restricted level.
    http://msdn.microsoft.com/en-us/library/office/ee526352.aspx
    You can consider to send a mail to initiator in "Whe a Task Completes" step when you click button approved/rejected, and construct the current task form link format as follow,
    http://sp/_layouts/15/WrkTaskIP.aspx?List=WorkflowTasksListGUID&ID=[%Current Task:ID%]
    Thanks
    Daniel Yang
    TechNet Community Support

  • 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

  • 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

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

  • How to send email from OSB with Mail server that requires SSL or STARTTLS

    Hi everyone.
    My leader ask me configuration on OSB to support send email to my company mail server (using https chanel) and customer email (some of them is gmail that require STARTTLS or SSL).
    I've configured OSB as tutorial in that link: http://blogs.oracle.com/christomkins/entry/sending_an_email_from_oracle_s
    But OSB cannot send email from mail account that configured because it cannot login to mail server. I think the reason is secure authentication with SSL or TLS.
    There some problems that similar to mine in this forum but has nobody solved it yet.
    Can you tell me the solution you know? Any suggestion is appreciated.
    Regards
    Cuong Pham

    I know I'll offer you just a workaround and not a real solution, but you can try to start your own (intermediate) SMTP server to communicate with OSB (without SSL). Then you can just relay all the messages to your "real" SMTP server which requires SSL. If you start your intermediate SMTP server on the OSB host (localhost), then this layout could be acceptable even from security point of view.

  • 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

Maybe you are looking for

  • RFC to SOAP Interface - Problem in Request Message Mapping

    Dear All, We are working on RFC to SOAP Scenario i.e. pulling out data from an WebService from SAP via PI. In Request Message Mapping, when the wsdl file is uploaded as Target Message, the wsdl request shows the nested elements like below. <Request>

  • Are non-Unibody Macbook Pros still viable for professional Photoshop/Lightroom work?

    I currently own a late 2008 Macbook pro (the first unibody) model with a 2.4ghz core 2 duo processor, and I am looking for something similar to get my wife who works with as an upgrade to her crappy old laptop that crashes on her when she has more th

  • Time Capsule internal HD not detected!

    Hi guys, I've just purchased a Time Capsule 500GB, just got home and pluged it in, all the airport function works well, but I'm not able to detect the hard drive in it at all. Isn't it suppost to be plug and play ? Maybe my unit is defective (I hope

  • Audio levels on my SONY PCM D50 portable recorder

    Hello, I am unable to get any audio levels on my SONY PCM D50 recorder. I use it very infrequently and i has never failed me otherwise, but suddenly this problem. I am sure that i have set to MIC (as sooposed to line), I DO NOT have it on the -20db s

  • LOV in Forms 10.1.2 app.ui.lovButtons=true

    Hi everybody! We found a solution (registry.dat) for automatic LOV buttons in: re:LOV button See note 267018.1 as well! We run Portal 9.0.2.6.18, but we'll upgrade to 10.1.2 soon. a) Will this feature still work? b) Will this feature finally work in