I am trying to use UTL_SMTP pkg to send the mails.
Everything is working fine with one exception. I am not able to find which email deliveries are failed due to invalide email address.
Script which I am using is...
l_mail_conn := UTL_SMTP.open_connection ('mailhost', 25)
l_vrfy_msg := utl_smtp.vrfy(l_mail_conn, 'email@example.com')
IF l_vrfy_msg.code = 550
DBMS_OUTPUT.PUT_LINE('email address Not found ...'||l_vrfy_msg.code
RAISE_APPLICATION_ERROR (-20001,'Invalid sender address')
I also tried using utl_smtp.rcpt but fail to get the expected output.
Yours help is appreciated in resolving this.
-bash-3.2$ telnet mail.foxriver.com 25
Connected to mail.foxriver.com.
Escape character is '^]'.
220 frfrexch01.frfr.foxriver.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at Tue, 30 Jul 2013 03:57:44 -0500
mailhost is replaced by mail.foxriver.com in script also