org.springframework.mail
Interface MailSender
- All Known Subinterfaces:
- JavaMailSender
- All Known Implementing Classes:
- CosMailSenderImpl
- public interface MailSender
This interface defines a strategy for sending simple mails. Can be
implemented for a variety of mailing systems due to the simple requirements.
For richer functionality like MIME messages, see JavaMailSender.
Allows for easy testing of clients, as it does not depend on JavaMail's
infrastructure classes: no mocking of JavaMail Session or Transport necessary.
- Author:
- Dmitriy Kopylenko, Juergen Hoeller
- Version: $Id: MailSender.java,v 1.4 2003/11/06 13:22:07 dkopylenko Exp $
- See Also: JavaMailSender
send
public void send(SimpleMailMessage simpleMessage)
throws MailException
- Send the given simple mail message.
- Parameters:
- simpleMessage - message to send
- Throws:
- MailException - in case of message, authentication, or send errors
send
public void send(SimpleMailMessage[] simpleMessages)
throws MailException
- Send the given array of simple mail messages in batch.
- Parameters:
- simpleMessages - messages to send
- Throws:
- MailException - in case of message, authentication, or send errors