Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PkOug] how to send a mail from oracle forms....

Expand Messages
  • Aamir Abbas
    Oracle databas provides builtin PL/SQL packages with the capability to send email right from the server. What you need to do is, understand those packages,
    Message 1 of 12 , Sep 1, 2006
      Oracle databas provides builtin PL/SQL packages with the capability to send email right from the server. What you need to do is, understand those packages, create your own function for customized requirement and call that function in your Forms application.

      You can find a customized package ready at the following link.

      http://wiki.ittoolbox.com/index.php/Code:Send_email_from_Oracle_Database

      Hope it helps.

      --
      Aamir Abbas

      ----- Original Message ----
      From: Muhammad Shuja <mshujaweb@...>
      To: PkOug@yahoogroups.com
      Sent: Thursday, August 31, 2006 2:21:07 PM
      Subject: Re: [PkOug] how to send a mail from oracle forms....

      Emailing is common feature, so there are several ways to do so. eg through reports, forms, database, application server, infact virtually any other Oracle tool.

      Using JSP:
      http://www.oracle. com/technology/ sample_code/ tech/java/ jsps/ojsp/ sendmail. html

      Mail Processing from within Java Stored Procedures / PL/SQL
      Metalink Note:73321.1

      How to send a E-Mail from Form 6i With The ORA_JAVA Package
      Metalink
      Note:131980. 1

      How to Send Email in Web Deployed Forms
      Metalink
      Note:125647. 1

      How to send Email from Forms using Run_report_object and web.show_document
      Metalink
      Note:304739. 1

      OLE AUTOMATION: Example Sending a Mail From Forms to Outlook
      Metalink
      Note:119828. 1


      On 8/28/06, Muhammad ASif Muhammad Suleman <asif_learning@ yahoo.com> wrote:

      Any Other Way ?



      mit@beaconhouse.edu.pk wrote:
      1-        If you want to have those addresses in TO field, you need to have loop to do that.
      2-       If you want to send individual e-mails, you can put the whole code in the loop to be executed for each recipient.
      HTH!
      Aleem

      From: PkOug@yahoogroups. com [mailto:PkOug@yahoogroups. com] On Behalf Of saif ali
      Sent: Sunday, August 27, 2006 12:51 PM
      To: PkOug@yahoogroups. com
      Subject: RE: [PkOug] how to send a mail from oracle forms....
      This is working fine but i want to send email multipal person what should can i  do ?

      mit@beaconhouse.edu.pk wrote:
      Try this form this is in D2k 6i:
      HTH!
      Aleem
      size=2 width="100%" align=center tabIndex=-1>
      From: PkOug@yahoogroups. com [mailto:PkOug@yahoogroups. com ] On Behalf Of Fazool Khan
      Sent: Saturday, August 26, 2006 11:22 AM
      To: PkOug@yahoogroups. com
      Subject: [PkOug] how to send a mail from oracle forms....
      Hello Members

      I'm trying to send a mail using Oracle forms builder
      ver. 6i. At a certain condition I want to send a mail
      through outlook, preferably.

      I create a procedure for this purpose,

      CREATE OR REPLACE PROCEDURE SEND_MAIL (
      msg_from varchar2 := 'oracle',
      msg_to varchar2,
      msg_subject varchar2 := 'E-Mail message from your
      database',
      msg_text varchar2 := '' )
      IS
      c utl_tcp.connection;
      rc integer;
      BEGIN
      c := utl_tcp.open_ connection( '127.0.0.1 ', 25);
      -- open the SMTP port 25 on local machine
      dbms_output. put_line( utl_tcp.get_ line(c, TRUE));
      rc := utl_tcp.write_ line(c, 'HELO localhost');
      dbms_output. put_line( utl_tcp.get_ line(c, TRUE));
      rc := utl_tcp.write_ line(c, 'MAIL FROM:
      '||msg_from) ;
      dbms_output. put_line( utl_tcp.get_ line(c, TRUE));
      rc := utl_tcp.write_ line(c, 'RCPT TO: '||msg_to);
      dbms_output. put_line( utl_tcp.get_ line(c, TRUE));
      rc := utl_tcp.write_ line(c, 'DATA');
      -- Start message body
      dbms_output. put_line( utl_tcp.get_ line(c, TRUE));
      rc := utl_tcp.write_ line(c, 'Subject:
      '||msg_subject) ;
      rc := utl_tcp.write_ line(c, '');
      rc := utl_tcp.write_ line(c, msg_text);
      rc := utl_tcp.write_ line(c, '.');
      -- End of message body
      dbms_output. put_line( utl_tcp.get_ line(c, TRUE));
      rc := utl_tcp.write_ line(c, 'QUIT');
      dbms_output. put_line( utl_tcp.get_ line(c, TRUE));
      utl_tcp.close_ connection( c);
      -- Close the connection
      EXCEPTION
      when others then
      raise_application_ error(
      -20000, 'Unable to send e-mail message from
      pl/sql because of: '||
      sqlerrm);
      END;
      ------------ ---------
      and I call this procedure by pressing a button
      send_mail('application@ domain.com', 'nam@domain. com',message_subjet,
      result );
      it gives me unhandeled exception ORA-20000

      Can anybody guide me in this regards.

      Thanx.


      ____________ _________ _________ _________ _________ _________ _
      Yahoo! India Answers: Share what you know. Learn something new
      http://in.answers. yahoo.com/

      Stay in the know. Pulse on the new Yahoo.com. Check it out.
       

      All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.


      Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.


      Do you Yahoo!?
      Everyone is raving about the all-new Yahoo! Mail.



    • Sohail Ahmed
      A fast growing group in Karachi is looking for Oracle Financial Consultant. Candidate can send their resumes to the following email account i.e.
      Message 2 of 12 , Oct 27, 2006

        A fast growing group in Karachi is looking for Oracle Financial Consultant. Candidate can send their resumes to the following email account i.e.

         

        sohail64@...

         

         

         

        Syed Sohail Ahmed

        Vice President

        Head of Information Technology

        Pak Kuwait Investment Co. (Pvt) Ltd

         

        Phone : +92 (021) 111 611 611 (Ext: 284)

         

         

         

        DISCLAIMER:

        The information contained in this message is confidential and may be protected by legal privilege. It is intended only for the person(s) named as addressee. The dissemination, distribution,copying or disclosure of this message, or its contents is strictly prohibited unless authorized by Pakistan Kuwait Investment Company Private Limited. If you have received this message in error, please return it to the sender at the above address.

         

        -----Original Message-----
        From: PkOug@yahoogroups.com [mailto:PkOug@yahoogroups.com] On Behalf Of Sikandar Hayat Awan
        Sent:
        Friday, September 01, 2006 8:57 AM
        To: PkOug@yahoogroups.com
        Subject: Re: [PkOug] how to send a mail from oracle forms....

         


        --
        Assalamu Alaikum!
        Pl visit the following link and let us know the issues you are facing.

        http://www.erpstuff.com/topic.asp?TOPIC_ID=12

        Thanks.

        Regards,
        www.erpstuff.com

        On 8/31/06, Muhammad Shuja < mshujaweb@...> wrote:

        Emailing is common feature, so there are several ways to do so. eg through reports, forms, database, application server, infact virtually any other Oracle tool.

        Using JSP:
        http://www.oracle.com/technology/sample_code/tech/java/jsps/ojsp/sendmail.html

        Mail Processing from within Java Stored Procedures / PL/SQL
        Metalink Note:73321.1

        How to send a E-Mail from Form 6i With The ORA_JAVA Package
        Metalink Note:131980.1

        How to Send Email in Web Deployed Forms
        Metalink Note:125647.1

        How to send Email from Forms using Run_report_object and web.show_document
        Metalink Note:304739.1

        OLE AUTOMATION: Example Sending a Mail From Forms to Outlook
        Metalink Note:119828.1

        On 8/28/06, Muhammad ASif Muhammad Suleman <asif_learning@...

        > wrote:

        Any Other Way ?



        mit@beaconhouse.edu.pk wrote:

        1-        If you want to have those addresses in TO field, you need to have loop to do that.

        2-       If you want to send individual e-mails, you can put the whole code in the loop to be executed for each recipient.

        HTH!

        Aleem


        From: PkOug@yahoogroups.com [mailto:PkOug@yahoogroups.com] On Behalf Of saif ali
        Sent:
        Sunday, August 27, 2006 12:51 PM
        To: PkOug@yahoogroups.com
        Subject: RE: [PkOug] how to send a mail from oracle forms....

        This is working fine but i want to send email multipal person what should can i  do ?

        mit@beaconhouse.edu.pk wrote:

        Try this form this is in D2k 6i:

        HTH!

        Aleem


        size=2 width="100%" align=center tabIndex=-1>

        From: PkOug@yahoogroups.com [mailto:PkOug@yahoogroups.com ] On Behalf Of Fazool Khan
        Sent:
        Saturday, August 26, 2006 11:22 AM
        To: PkOug@yahoogroups.com
        Subject: [PkOug] how to send a mail from oracle forms....

        Hello Members

        I'm trying to send a mail using Oracle forms builder
        ver. 6i. At a certain condition I want to send a mail
        through outlook, preferably.

        I create a procedure for this purpose,

        CREATE OR REPLACE PROCEDURE SEND_MAIL (
        msg_from varchar2 := 'oracle',
        msg_to varchar2,
        msg_subject varchar2 := 'E-Mail message from your
        database',
        msg_text varchar2 := '' )
        IS
        c utl_tcp.connection;
        rc integer;
        BEGIN
        c := utl_tcp.open_connection(' 127.0.0.1 ', 25);
        -- open the SMTP port 25 on local machine
        dbms_output.put_line(utl_tcp.get_line(c, TRUE));
        rc := utl_tcp.write_line(c, 'HELO localhost');
        dbms_output.put_line(utl_tcp.get_line(c, TRUE));
        rc := utl_tcp.write_line(c, 'MAIL FROM:
        '||msg_from);
        dbms_output.put_line(utl_tcp.get_line(c, TRUE));
        rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
        dbms_output.put_line(utl_tcp.get_line(c, TRUE));
        rc := utl_tcp.write_line(c, 'DATA');
        -- Start message body
        dbms_output.put_line(utl_tcp.get_line(c, TRUE));
        rc := utl_tcp.write_line(c, 'Subject:
        '||msg_subject);
        rc := utl_tcp.write_line(c, '');
        rc := utl_tcp.write_line(c, msg_text);
        rc := utl_tcp.write_line(c, '.');
        -- End of message body
        dbms_output.put_line(utl_tcp.get_line(c, TRUE));
        rc := utl_tcp.write_line(c, 'QUIT');
        dbms_output.put_line(utl_tcp.get_line(c, TRUE));
        utl_tcp.close_connection(c);
        -- Close the connection
        EXCEPTION
        when others then
        raise_application_error(
        -20000, 'Unable to send e-mail message from
        pl/sql because of: '||
        sqlerrm);
        END;
        ---------------------
        and I call this procedure by pressing a button
        send_mail('application@...', 'nam@...',message_subjet,
        result );
        it gives me unhandeled exception ORA-20000

        Can anybody guide me in this regards.

        Thanx.


        __________________________________________________________
        Yahoo! India Answers: Share what you know. Learn something new
        http://in.answers.yahoo.com/


        Stay in the know. Pulse on the new Yahoo.com. Check it out.

         


        All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

         


        Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.


        Do you Yahoo!?
        Everyone is raving about the all-new Yahoo! Mail.



         


        DISCLAIMER:
        "The information contained in this message is confidential and may be protected by legal privilege. It is intended only for the person(s) named as addressee. The dissemination, distribution,copying or disclosure of this message, or its contents is strictly prohibited unless authorized by Pakistan Kuwait Investment Company Private Limited. If you have received this message in error, please return it to the sender at the above address".
      Your message has been successfully submitted and would be delivered to recipients shortly.