Thursday, October 8, 2009

Code to Send Email from Oracle DB


Code to Send Email from Oracle DB

DECLARE
v_connection UTL_SMTP.CONNECTION;
BEGIN
v_connection := UTL_SMTP.OPEN_CONNECTION('mail.company.com',25);
UTL_SMTP.HELO(v_connection,'mail.company.com');
UTL_SMTP.MAIL(v_connection,'contact@company.com');
UTL_SMTP.RCPT(v_connection,'contact@company.com');
UTL_SMTP.DATA(v_connection,'Testing Hello Mail');
UTL_SMTP.QUIT(v_connection);
END;

0 comments:

Post a Comment

Total Pageviews

Copyright © Tech & Management Notes