public interface MailSender
Allows for easy testing of clients, as it does not depend on JavaMail's infrastructure classes: no mocking of JavaMail Session or Transport necessary.
JavaMailSender
Modifier and Type | Method and Description |
---|---|
void |
send(SimpleMailMessage... simpleMessages)
Send the given array of simple mail messages in batch.
|
void |
send(SimpleMailMessage simpleMessage)
Send the given simple mail message.
|
void send(SimpleMailMessage simpleMessage) throws MailException
simpleMessage
- the message to sendMailParseException
- in case of failure when parsing the messageMailAuthenticationException
- in case of authentication failureMailSendException
- in case of failure when sending the messageMailException
void send(SimpleMailMessage... simpleMessages) throws MailException
simpleMessages
- the messages to sendMailParseException
- in case of failure when parsing a messageMailAuthenticationException
- in case of authentication failureMailSendException
- in case of failure when sending a messageMailException