atg.service.email
Interface EmailMessageSender

All Known Implementing Classes:
SMTPEmailSender

public interface EmailMessageSender

An interface for sending javax.mail.Message objects.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 void closeConnection(javax.mail.Transport pTransport)
          Closes the connection identified by the Transport object.
 javax.mail.Transport openConnection()
          Opens a connection to the mail server.
 void sendEmailMessage(javax.mail.Message pMessage)
          Sends an email message.
 void sendEmailMessage(javax.mail.Message pMessage, javax.mail.Transport pTransport)
          Sends an email message.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

openConnection

javax.mail.Transport openConnection()
                                    throws EmailException
Opens a connection to the mail server.

Returns:
Transport object representing the open connection
Throws:
EmailException - if the connection could not be opened

sendEmailMessage

void sendEmailMessage(javax.mail.Message pMessage,
                      javax.mail.Transport pTransport)
                      throws EmailException
Sends an email message. The parameters of the email are specified within the Message object. The Transport object identifies the connection over which the message will be sent; the connection must have already been opened.

Throws:
EmailException - if the connection is not open, or if the message could not be sent

sendEmailMessage

void sendEmailMessage(javax.mail.Message pMessage)
                      throws EmailException
Sends an email message. The parameters of the email are specified within the Message object. A new connection to the mail server will be opened, the message sent, and the connection closed.

Throws:
EmailException - if the message could not be sent

closeConnection

void closeConnection(javax.mail.Transport pTransport)
                     throws EmailException
Closes the connection identified by the Transport object.

Throws:
EmailException - if the connection could not be closed