Hello,
I have a section of code that sends an email using the
transport.send(msg) method, in a try/catch block, catching SendFailedExceptions nested in a try/catch block that catches MessagingExceptions.
try{
try {
transport.send(msg);
// "other code"
}
catch (SendFailedException sfe) {
// some error logging here
}
}
catch {MessagingException me) {
// some more error logging here
}
The
"other code" is being executed, so
transport.send(msg) must be successful.
The email should be sent, but the intended recipient does not receive it. The SMTP server log, which logs errors only, does not show any problems at that time.
My question is, what can I guarantee to happen at that point, in terms of interaction with the SMTP server?
Is no exception a guarantee that the SMTP server successfully received the message?
Thanks for your help,
Mark.