toolbox.mail
Class SMTPMailerImpl

Package class diagram package SMTPMailerImpl
java.lang.Object
  extended by toolbox.mail.SMTPMailerImpl
All Implemented Interfaces:
SMTPMailer

public class SMTPMailerImpl
extends java.lang.Object
implements SMTPMailer

Default SMTPMailer implementation.


Constructor Summary
SMTPMailerImpl()
          Default constructor.
 
Method Summary
 void destroy()
          Destroy this mailer.
 void init(MailManager manager)
          Initialise this mailer with the manager that created it.
 void send(java.util.List to, java.util.List cc, java.util.List bcc, java.lang.String from, java.util.List replyTo, java.lang.String subject, java.lang.String body, java.util.List attach, boolean singleMsg)
          Send an e-mail message to a List of recipients.
 void send(java.util.List to, java.util.List cc, java.util.List bcc, java.lang.String from, java.util.List replyTo, java.lang.String subject, java.lang.String body, java.util.List attach, java.lang.String contentType, boolean singleMsg)
          Send an e-mail message to a List of recipients.
 void send(java.util.List to, java.lang.String from, java.util.List replyTo, java.lang.String subject, java.lang.String body, java.util.List attach, boolean singleMsg)
          Send an e-mail message to a List of recipients.
 void send(java.util.List to, java.lang.String from, java.util.List replyTo, java.lang.String subject, java.lang.String body, java.util.List attach, java.lang.String contentType, boolean singleMsg)
          Send an e-mail message to a List of recipients.
 void send(java.lang.String to, java.lang.String from, java.util.List replyTo, java.lang.String subject, java.lang.String body, java.util.List attach)
          Send an e-mail message to a single recipient.
 void send(java.lang.String to, java.lang.String from, java.util.List replyTo, java.lang.String subject, java.lang.String body, java.util.List attach, java.lang.String contentType)
          Send an e-mail message to a single recipient.
 void send(java.lang.String to, java.lang.String cc, java.lang.String bcc, java.lang.String from, java.util.List replyTo, java.lang.String subject, java.lang.String body, java.util.List attach)
          Send an e-mail message to a single recipient.
 void send(java.lang.String to, java.lang.String cc, java.lang.String bcc, java.lang.String from, java.util.List replyTo, java.lang.String subject, java.lang.String body, java.util.List attach, java.lang.String contentType)
          Send an e-mail message to a single recipient.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMTPMailerImpl

public SMTPMailerImpl()
Default constructor.

Method Detail

init

public void init(MailManager manager)
          throws MailException
Initialise this mailer with the manager that created it.

Specified by:
init in interface SMTPMailer
Parameters:
manager - MailManager that created this mailer.
Throws:
MailException - if the mailer cannot be initialised.

send

public void send(java.util.List to,
                 java.lang.String from,
                 java.util.List replyTo,
                 java.lang.String subject,
                 java.lang.String body,
                 java.util.List attach,
                 java.lang.String contentType,
                 boolean singleMsg)
          throws MailException
Send an e-mail message to a List of recipients.

Specified by:
send in interface SMTPMailer
Parameters:
to - List of e-mail addresses as String instances.
from - String containing the from e-mail address.
replyTo - List containing the replyTo e-mail address.
subject - String containing message subject line.
body - String containing the message body.
attach - List containing URL's for attachments.
contentType - Sting indicating the content type.
singleMsg - Boolean indicating whether the message must be sent to all recipients in a single delivery or separate deliveries.
Throws:
MailException - if the message cannot be delivered.

send

public void send(java.util.List to,
                 java.util.List cc,
                 java.util.List bcc,
                 java.lang.String from,
                 java.util.List replyTo,
                 java.lang.String subject,
                 java.lang.String body,
                 java.util.List attach,
                 java.lang.String contentType,
                 boolean singleMsg)
          throws MailException
Send an e-mail message to a List of recipients.

Specified by:
send in interface SMTPMailer
Parameters:
to - List of e-mail addresses as String instances.
cc - List of e-mail addresses as String instances.
bcc - List of e-mail addresses as String instances.
from - String containing the from e-mail address.
replyTo - List containing the replyTo e-mail address.
subject - String containing message subject line.
body - String containing the message body.
attach - List containing the attachment URL's.
contentType - Sting indicating the content type.
singleMsg - Boolean indicating whether the message must be sent to all recipients in a single delivery or separate deliveries.
Throws:
MailException - if the message cannot be delivered.

send

public void send(java.util.List to,
                 java.util.List cc,
                 java.util.List bcc,
                 java.lang.String from,
                 java.util.List replyTo,
                 java.lang.String subject,
                 java.lang.String body,
                 java.util.List attach,
                 boolean singleMsg)
          throws MailException
Send an e-mail message to a List of recipients.

Specified by:
send in interface SMTPMailer
Parameters:
to - List of e-mail addresses as String instances.
cc - List of e-mail addresses as String instances.
bcc - List of e-mail addresses as String instances.
from - String containing the from e-mail address.
replyTo - List containing the replyTo e-mail address.
subject - String containing message subject line.
body - String containing the message body.
attach - List containing attachment URL's.
singleMsg - Boolean indicating whether the message must be sent to all recipients in a single delivery or separate deliveries.
Throws:
MailException - if the message cannot be delivered.

send

public void send(java.util.List to,
                 java.lang.String from,
                 java.util.List replyTo,
                 java.lang.String subject,
                 java.lang.String body,
                 java.util.List attach,
                 boolean singleMsg)
          throws MailException
Send an e-mail message to a List of recipients.

Specified by:
send in interface SMTPMailer
Parameters:
to - List of e-mail addresses as String instances.
from - String containing the from e-mail address.
replyTo - List containing the replyTo e-mail address.
subject - String containing message subject line.
body - String containing the message body.
attach - List containing attachment URL's.
singleMsg - Boolean indicating whether the message must be sent to all recipients in a single delivery or separate deliveries.
Throws:
MailException - if the message cannot be delivered.

send

public void send(java.lang.String to,
                 java.lang.String from,
                 java.util.List replyTo,
                 java.lang.String subject,
                 java.lang.String body,
                 java.util.List attach)
          throws MailException
Send an e-mail message to a single recipient.

Specified by:
send in interface SMTPMailer
Parameters:
to - String containing the recipient address.
from - String containing the from address.
replyTo - List containing the replyTo address.
subject - String containing the subject line.
body - String containing the message body.
attach - List containing attachment URL's.
Throws:
MailException - if the message cannot be delivered.

send

public void send(java.lang.String to,
                 java.lang.String cc,
                 java.lang.String bcc,
                 java.lang.String from,
                 java.util.List replyTo,
                 java.lang.String subject,
                 java.lang.String body,
                 java.util.List attach)
          throws MailException
Send an e-mail message to a single recipient.

Specified by:
send in interface SMTPMailer
Parameters:
to - String containing the recipient address.
cc - String containing the cc address.
bcc - String containing the bcc address.
from - String containing the from address.
replyTo - List containing the replyTo address.
subject - String containing the subject line.
body - String containing the message body.
attach - List containing attachment URL's.
Throws:
MailException - if the message cannot be delivered.

send

public void send(java.lang.String to,
                 java.lang.String from,
                 java.util.List replyTo,
                 java.lang.String subject,
                 java.lang.String body,
                 java.util.List attach,
                 java.lang.String contentType)
          throws MailException
Send an e-mail message to a single recipient.

Specified by:
send in interface SMTPMailer
Parameters:
to - String containing the recipient address.
from - String containing the from address.
replyTo - List containing the replyTo address.
subject - String containing the subject line.
body - String containing the message body.
attach - List containing attachment URL's.
contentType - Sting indicating the content type.
Throws:
MailException - if the message cannot be delivered.

send

public void send(java.lang.String to,
                 java.lang.String cc,
                 java.lang.String bcc,
                 java.lang.String from,
                 java.util.List replyTo,
                 java.lang.String subject,
                 java.lang.String body,
                 java.util.List attach,
                 java.lang.String contentType)
          throws MailException
Send an e-mail message to a single recipient.

Specified by:
send in interface SMTPMailer
Parameters:
to - String containing the recipient address.
cc - String containing the cc address.
bcc - String containing the bcc address.
from - String containing the from address.
replyTo - List containing the replyTo address.
subject - String containing the subject line.
body - String containing the message body.
attach - List containing attachment URL's.
contentType - Sting indicating the content type.
Throws:
MailException - if the message cannot be delivered.

destroy

public void destroy()
Destroy this mailer.

Specified by:
destroy in interface SMTPMailer