Search code examples
javaemailjakarta-mail

Reasons for javax.mail.SendFailedException: No recipient addresses error


Could some one please let me know why could we get the following exception.

javax.mail.SendFailedException: No recipient addresses

Could it be because an address is null or empty? Or something else?


Solution

  • As per the documentation found here

    This exception is thrown when the message cannot be sent. The exception includes those addresses to which the message could not be sent as well as the valid addresses to which the message was sent and valid addresses to which the message was not sent