Hi list,
I have a problem with package UTL_SNMP. I have a procedure which sends mails
to special recipient. My problem is, that the body of the message
(utl_smtp.data(mail_conn, message);) will not be sent. Any help is welcome.
Following the procedure.
create or replace PROCEDURE sendmail
AS
sERROR_CODE VARCHAR2(10);
sERROR_TEXT VARCHAR2(250);
mailhost VARCHAR2(30) := 'mailhost';
mail_conn utl_smtp.connection;
sender varchar2(20) :='[EMAIL PROTECTED]';
recipient varchar2(50) :='[EMAIL PROTECTED]';
message varchar2(200) :='This is the message text.';
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);
EXCEPTION
WHEN OTHERS THEN
sERROR_CODE := 'ORA' || SQLCODE;
sERROR_TEXT := sERROR_TEXT || ' ' || SQLERRM;
INSERT INTO ELREFADMIN.MAILERROR
( ERROR_CODE, ERROR_TEXT)
VALUES (sERROR_CODE, sERROR_TEXT);
END;
/
TIA
Volker Schön
E-Mail: mailto:[EMAIL PROTECTED]
http://www.inplan.de
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Schoen Volker
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).