Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Saturday, August 13, 2011

Send e mail through PL SQL code

CREATE OR REPLACE
PROCEDURE erpschools_send_email
IS
mailhost VARCHAR2 (30) := 'smtp.erpschools.com';
crlf VARCHAR2(2)Â := CHR (13) || CHR (10);
v_email VARCHAR2(16000);
message_1 LONG;
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection (mailhost, 25);
utl_smtp.helo (mail_conn, mailhost);
utl_smtp.mail (mail_conn, 'sender@oracle.com');
utl_smtp.rcpt (mail_conn, 'receiver@oracle.com');
MESSAGE_1 := 'From: Mr Sender < sender@oracle.com >'
|| CRLF || 'Subject: Testing Hyperlink'
|| CRLF || 'To: Mrs Receiver '
|| CRLF || ''
|| crlf || crlf ;
UTL_SMTP.DATA(MAIL_CONN, 'MIME-Version: 1.0'
||CHR(13)
||CHR(10)
||'Content-type: text/html'
|| CHR(13)
||CHR(10)
||message_1);
utl_smtp.quit (mail_conn);
END;

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect