org.springframework.mail
Interface MailSender

All Known Subinterfaces:
JavaMailSender
All Known Implementing Classes:
CosMailSenderImpl, JavaMailSenderImpl

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, consider 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.

Since:
10.09.2003
Version:
$Id: MailSender.java,v 1.6 2004/03/18 02:46:05 trisberg Exp $
Author:
Dmitriy Kopylenko, Juergen Hoeller
See Also:
JavaMailSender

Method Summary
 void send(SimpleMailMessage simpleMessage)
          Send the given simple mail message.
 void send(SimpleMailMessage[] simpleMessages)
          Send the given array of simple mail messages in batch.
 

Method Detail

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


Copyright (C) 2003-2004 The Spring Framework Project.