Re: UTL_SMTP have no subject?
From: TimKArnold <timkarnold_at_aol.com>
Date: 18 Oct 2000 23:29:32 GMT
Message-ID: <20001018192932.08868.00000372_at_ng-bk1.aol.com>
/
Date: 18 Oct 2000 23:29:32 GMT
Message-ID: <20001018192932.08868.00000372_at_ng-bk1.aol.com>
Subject, yes. I don't think Cc or Bcc are available. UTL_SMTP is based on a pretty old standard. But I suppose you could create a distribution list w/Cc and Bcc.
create or replace procedure send_mail (
mail_server IN VARCHAR2,
sender IN VARCHAR2,
recipient IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2)
IS
c utl_smtp.connection;
mesg VARCHAR2( 4000 );
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
BEGIN
c := utl_smtp.open_connection(mail_server,25);
utl_smtp.helo(c, mail_server);
utl_smtp.mail(c, sender);
utl_smtp.rcpt(c, recipient);
mesg:= 'Date: ' || TO_CHAR(SYSDATE, 'dd Mon yy hh24:mi:ss');
mesg:= mesg || crlf;
mesg:= mesg || 'From: ' || sender || ' <' || sender || '>';
mesg:= mesg || crlf;
mesg:= mesg || 'To: ' || recipient || ' <' || recipient || '>';
mesg:= mesg || crlf;
mesg:= mesg || 'Subject: ' || subject;
mesg:= mesg || crlf;
mesg:= mesg || '' || crlf || message;
utl_smtp.data(c, mesg);
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
utl_smtp.quit(c);
raise_application_error(-20000,
'Failed to send mail due to the following error: ' || sqlerrm);
END;
/
>Does UTL_SMTP have capabilities like 'Subject', 'Cc', Bcc'? None of
>this is mentioned in Oracle documentation.
>
>Thanks
>
>
Received on Thu Oct 19 2000 - 01:29:32 CEST
