java.lang.Object | ||||||
↳ | java.lang.Throwable | |||||
↳ | java.lang.Exception | |||||
↳ | java.lang.RuntimeException | |||||
↳ | org.springframework.core.NestedRuntimeException | |||||
↳ | org.springframework.mail.MailException | |||||
↳ | org.springframework.mail.MailSendException |
Exception thrown when a mail sending error is encountered. Can register failed messages with their exceptions.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor for MailSendException.
| |||||||||||
Constructor for MailSendException.
| |||||||||||
Constructor for registration of failed messages, with the
messages that failed as keys, and the thrown exceptions as values.
| |||||||||||
Constructor for registration of failed messages, with the
messages that failed as keys, and the thrown exceptions as values.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a Map with the failed messages as keys, and the thrown exceptions
as values.
| |||||||||||
Return the detail message, including the message from the nested exception
if there is one.
| |||||||||||
Return an array with thrown message exceptions.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.core.NestedRuntimeException
| |||||||||||
From class
java.lang.Throwable
| |||||||||||
From class
java.lang.Object
|
Constructor for MailSendException.
msg | the detail message |
---|
Constructor for MailSendException.
msg | the detail message |
---|---|
cause | the root cause from the mail API in use |
Constructor for registration of failed messages, with the messages that failed as keys, and the thrown exceptions as values.
The messages should be the same that were originally passed to the invoked send method.
msg | the detail message |
---|---|
cause | the root cause from the mail API in use |
failedMessages | Map of failed messages as keys and thrown exceptions as values |
Constructor for registration of failed messages, with the messages that failed as keys, and the thrown exceptions as values.
The messages should be the same that were originally passed to the invoked send method.
failedMessages | Map of failed messages as keys and thrown exceptions as values |
---|
Return a Map with the failed messages as keys, and the thrown exceptions as values.
Note that a general mail server connection failure will not result in failed messages being returned here: A message will only be contained here if actually sending it was attempted but failed.
The messages will be the same that were originally passed to the invoked send method, that is, SimpleMailMessages in case of using the generic MailSender interface.
In case of sending MimeMessage instances via JavaMailSender, the messages will be of type MimeMessage.
NOTE: This Map will not be available after serialization.
Use getMessageExceptions()
in such a scenario, which will
be available after serialization as well.
SimpleMailMessage
Return the detail message, including the message from the nested exception if there is one.
Return an array with thrown message exceptions.
Note that a general mail server connection failure will not result in failed messages being returned here: A message will only be contained here if actually sending it was attempted but failed.