Interface MailErrorHandler
- All Known Implementing Classes:
DefaultMailErrorHandler
public interface MailErrorHandler
This class is used to handle errors that occur when email messages are unable to be
sent.
- Since:
- 2.1
- Author:
- Dan Garrette, Dave Syer, Mahmoud Ben Hassine
-
Method Summary
-
Method Details
-
handle
void handle(org.springframework.mail.MailMessage message, Exception exception) throws org.springframework.mail.MailException This method will be called for each message that failed sending in the chunk. If the failed message is needed by the handler it will need to be downcast according to its runtime type. If an exception is thrown from this method, then it will propagate to the caller.- Parameters:
message
- the failed messageexception
- the exception that caused the failure- Throws:
org.springframework.mail.MailException
- if the exception cannot be handled
-