站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

MailSender (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.mail
Interface MailSender

All Known Subinterfaces:
JavaMailSender
All Known Implementing Classes:
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
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

void send(SimpleMailMessage simpleMessage)
          throws MailException
Send the given simple mail message.

Parameters:
simpleMessage - the message to send
Throws:
MailParseException - in case of failure when parsing the message
MailAuthenticationException - in case of authentication failure
MailSendException - in case of failure when sending the message
MailException

send

void send(SimpleMailMessage[] simpleMessages)
          throws MailException
Send the given array of simple mail messages in batch.

Parameters:
simpleMessages - the messages to send
Throws:
MailParseException - in case of failure when parsing a message
MailAuthenticationException - in case of authentication failure
MailSendException - in case of failure when sending a message
MailException

The Spring Framework

Copyright © 2002-2007 The Spring Framework.