Hallo,

anyone whom can help me. I would like this code to send email to two recipients, what 
is missing?
Thanks for all help I can get.

PROCEDURE       sendmailtestny2(
                           inRecipient1 IN VARCHAR2,
                                 inRecipient2 in VARCHAR2,
                           inSubject IN VARCHAR2,
                           inMessage IN VARCHAR2,
                           inSender IN VARCHAR2 := '[EMAIL PROTECTED]' )
IS
   crlf VARCHAR2(2) := CHR(13)||CHR(10);
   mailhost    VARCHAR2(30) := 'asolc78.ica.se';
   mail_conn  utl_smtp.connection;
   lMessage1 VARCHAR2(200);
   lmessage2 VARCHAR2(200);
BEGIN

   lMessage1 := 'From:' || inSender || crlf ||
               'Subject:' || inSubject || crlf ||
               'To:' || inRecipient1 || crlf || '' || crlf ||
                  inrecipient2 || crlf || '' || crlf ||
                                 inMessage || crlf || crlf || '/' || inSender;

     --lMessage2 := 'From:' || inSender || crlf ||
      --         'Subject:' || inSubject || crlf ||
        --       'To:' || inRecipient2 || crlf || '' || crlf ||
          --     inMessage || crlf || crlf || '/' || inSender;

   mail_conn := utl_smtp.open_connection(mailhost, 25);
   utl_smtp.helo(mail_conn, mailhost);
   utl_smtp.mail(mail_conn, inSender);
   utl_smtp.rcpt(mail_conn, inRecipient1);
   utl_smtp.rcpt(mail_conn, inRecipient2);
   utl_smtp.data(mail_conn, lMessage1);
   utl_smtp.data(mail_conn, lMessage2);
   utl_smtp.quit(mail_conn);

END;


Roland

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to