CREATE OR REPLACE PROCEDURE EMAIL_MESSAGE(
from_name VARCHAR2
, to_name VARCHAR2
, subject VARCHAR2
, MESSAGE VARCHAR2
)
IS
l_mailhost VARCHAR2 (64) := 'server.com';
l_mail_conn UTL_SMTP.connection;
BEGIN
l_mail_conn := UTL_SMTP.open_connection (l_mailhost, 25);
UTL_SMTP.helo (l_mail_conn, l_mailhost);
UTL_SMTP.mail (l_mail_conn, from_name);
UTL_SMTP.rcpt (l_mail_conn, to_name);
UTL_SMTP.open_data (l_mail_conn);
UTL_SMTP.write_data (l_mail_conn
, 'Date: '
|| TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS')
|| CHR (13)
);
UTL_SMTP.write_data (l_mail_conn, 'From: ' || from_name || CHR (13));
UTL_SMTP.write_data (l_mail_conn, 'Subject: ' || subject || CHR (13));
UTL_SMTP.write_data (l_mail_conn, 'To: ' || to_name || CHR (13));
UTL_SMTP.write_data (l_mail_conn, MESSAGE );
UTL_SMTP.close_data (l_mail_conn);
UTL_SMTP.quit (l_mail_conn);
END;
/
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.
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.
Wednesday, September 28, 2011
Send Email through PL/SQL
Subscribe to:
Post Comments (Atom)
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.
No comments:
Post a Comment