How does JavaMail deal with queuing mail when the initial attempt fails?

John Zukowski

It doesn't. A javax.mail.MessagingException will be thrown if there is a failure in sending the message. It is your responsibility to try to recover. The MessagingException class maintains a linked list of exceptions that caused the problem, as there may be more than one. You get each one by following the return of getNextException().