Hi,

I am able to send to multiple email addresses using the utl_smtp utility. However, if one of the email addresses is invalid, it will jump to the exception and will not send to any of the other valid addresses. Is there anyway of outcoming it?

If one of the addresses is invalid, it is possible for it to send a mail to my email address to notify me? Below is my send email procedure. Pls help! thanks!

CREATE OR REPLACE PROCEDURE send_email (
sender IN VARCHAR2,
recipient IN VARCHAR2,
subj IN VARCHAR2,
message IN VARCHAR2)
IS
mailhost VARCHAR2(30) := 'dbasupport.com';
c utl_smtp.connection;
BEGIN
c := utl_smtp.open_connection(mailhost,25);
utl_smtp.helo(c, mailhost);
utl_smtp.mail(c, sender);
utl_smtp.rcpt(c, recipient);
utl_smtp.open_data(c);
utl_smtp.write_data(c, utl_tcp.CRLF || message);
utl_smtp.close_data(c);
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
utl_smtp.quit(c);
raise_application_error(-20000,
'Failed to send mail due to the following error: ' || sqlerrm);
END;