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;
One Response Leave a comment
Its interesting code to write for sending email. I tried and was able to send mail. In what cases, you will use this code? Any ideas..