org.springframework.mail.cos
Class CosMailSenderImpl

java.lang.Object
  extended by org.springframework.mail.cos.CosMailSenderImpl
All Implemented Interfaces:
MailSender

public class CosMailSenderImpl
extends Object
implements MailSender

Simple implementation of SMTP mail sending on top of Jason Hunter's MailMessage class that's included in COS (com.oreilly.servlet).

Does not support any richer functionality than MailSender and SimpleMailMessage, therefore there's no optional richer interface like the JavaMailSender interface for the JavaMailSenderImpl implementation.

Does not support "replyTo" and "sentDate" fields; will consequently throw an exception when encountering either of those.

Since:
09.10.2003
Author:
Juergen Hoeller
See Also:
MailMessage, JavaMailSenderImpl

Constructor Summary
CosMailSenderImpl()
           
 
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.
 void setHost(String host)
          Set the SMTP mail host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CosMailSenderImpl

public CosMailSenderImpl()
Method Detail

setHost

public void setHost(String host)
Set the SMTP mail host.


send

public void send(SimpleMailMessage simpleMessage)
          throws MailException
Description copied from interface: MailSender
Send the given simple mail message.

Specified by:
send in interface MailSender
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

public void send(SimpleMailMessage[] simpleMessages)
          throws MailException
Description copied from interface: MailSender
Send the given array of simple mail messages in batch.

Specified by:
send in interface MailSender
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


Copyright (c) 2002-2006 The Spring Framework Project.