-
the proc is not working
The below procedure is valid; however, when I execute the proc it ran but I didn't get the from sender to the recepient nor messsage, it's an empty email.
Any advises???
CREATE OR REPLACE PROCEDURE TEST.SEND_MAIL_TEMP (v_sender IN VARCHAR2,
v_recipient IN VARCHAR2,
v_subject IN VARCHAR2,
v_message IN VARCHAR2)
as
l_mailhost VARCHAR2(30) := '111.11.1111';
l_mail_conn utl_smtp.connection;
crlf varchar2(2):= CHR(13)||CHR(10);
mesg varchar2(4000);
BEGIN
l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
mesg := 'Date: '||to_char(sysdate,'dd Mon yy hh24:mi:ss' )||crlf
||'FROM: '|| v_SENDER||' >'||crlf||'Subject: '||v_SUBJECT|| crlf ||'To: '
|| v_RECIPIENT || crlf ||''|| crlf || v_message;
utl_smtp.helo(l_mail_conn, l_mailhost);
utl_smtp.mail(l_mail_conn, v_sender);
utl_smtp.rcpt(l_mail_conn, v_recipient);
utl_smtp.data(l_mail_conn, v_message);
-- utl_smtp.write_data(l_mail_conn, v_message);
-- utl_smtp.close_data(l_mail_conn );
utl_smtp.quit(l_mail_conn);
end
;
/
-
just wondering, is the mailhost an ip address of 3 masks...?
-
Pando,
the mail host is not an issue, what you see is just a dummy number I have. Any way, I still get the email after the rpocedure is executed; however, it's nothing on the email.
-
STFW. I see about 20 examples of this every day.
Jeff Hunter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|