public interface MailSender
| 限定符和类型 | 方法和说明 |
|---|---|
void |
send(SimpleMailMessage simpleMessage)
Send the given simple mail message.
|
void |
send(SimpleMailMessage[] simpleMessages)
Send the given array of simple mail messages in batch.
|
void send(SimpleMailMessage simpleMessage) throws MailException
simpleMessage - the message to sendorg.springframework.mail.MailParseException - in case of failure when parsing the messageorg.springframework.mail.MailAuthenticationException - in case of authentication failureorg.springframework.mail.MailSendException - in case of failure when sending the messageMailExceptionvoid send(SimpleMailMessage[] simpleMessages) throws MailException
simpleMessages - the messages to sendorg.springframework.mail.MailParseException - in case of failure when parsing a messageorg.springframework.mail.MailAuthenticationException - in case of authentication failureorg.springframework.mail.MailSendException - in case of failure when sending a messageMailExceptionCopyright © 2016. All rights reserved.