planetj.common
Class CMMailMessage

java.lang.Object
  |
  +--planetj.common.CMMailMessage
All Implemented Interfaces:
Serializable

public class CMMailMessage
extends Object
implements Serializable

This class is used for creating a message which can be used by the CMMailer for sending.

Author:
PlanetJ Corporation
See Also:
Serialized Form

Constructor Summary
CMMailMessage()
          Constructor.
 
Method Summary
 void addAttachment(File file)
          Add an attachment file to this email.
 void addBCC(List addresses)
          Add a BCC address to this message.
 void addBCC(String address)
          Add a blind carbon copy address to this message.
 void addCC(List addresses)
          Add a CC address to this message.
 void addReplyTo(List addresses)
          Add a reply to address to this message.
 void addReplyTo(String address)
          Add a reply to address to this message.
 void addTo(List addresses)
          Add a To address to this message.
 void addTo(String address)
          Sets the recipients of the message.
 List getAttachments()
          Gets the attachment files of the message.
 List getBcc()
          Gets the recipients of the message blind copy.
 String getBody()
          Returns the body of the message.
 List getCc()
          Gets the recipients of the message copy.
 String getContentType()
          Gets the content type of this message.
 String getFrom()
          Returns the message's from field.
 List getReplyTo()
          Gets a list of address to reply to.
 String getSubject()
          Returns the subject of the message.
 List getTo()
          Gets the recipients of the message.
 boolean isAuthenticate()
          Should we authenticate with the server before sending mail? Some SMTP servers require it while others don't.
 void setAttachments(List attachments)
          Sets the attachment file names for the message.
 void setAuthenticate(boolean newMAuthenticate)
          Should we authenticate with the server before sending mail? Some SMTP servers require it while others don't.
 void setBcc(List bcc)
          Sets the recipients of the message blindcopy.
 void setBody(String body)
          Sets the body of the message.
 void setCc(List cc)
          Sets the recipients of the message copy.
 void setContentType(String contentType)
          Sets the content type of this message.
 void setFrom(String from)
          Sets the message's from field.
 void setReplyTo(List replyTo)
          Sets the recipients of the message.
 void setSubject(String subject)
          Sets the subject of the message.
 void setTo(List to)
          Sets the recipients of the message.
 void setTo(String to)
          Sets the recipients of the message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMMailMessage

public CMMailMessage()
Constructor.

Method Detail

addBCC

public void addBCC(String address)
Add a blind carbon copy address to this message.

Parameters:
address -

addAttachment

public void addAttachment(File file)
Add an attachment file to this email.


addBCC

public void addBCC(List addresses)
Add a BCC address to this message.


addCC

public void addCC(List addresses)
Add a CC address to this message.


addReplyTo

public void addReplyTo(String address)
Add a reply to address to this message.


addReplyTo

public void addReplyTo(List addresses)
Add a reply to address to this message.


addTo

public void addTo(String address)
Sets the recipients of the message.


addTo

public void addTo(List addresses)
Add a To address to this message.


getAttachments

public List getAttachments()
Gets the attachment files of the message. Only java.io.File objects should be added to this ArrayList

Returns:
ArrayList

getBcc

public List getBcc()
Gets the recipients of the message blind copy.

Returns:
ArrayList

getBody

public String getBody()
Returns the body of the message.

Returns:
String

getCc

public List getCc()
Gets the recipients of the message copy.

Returns:
ArrayList

getContentType

public String getContentType()
Gets the content type of this message.

Returns:
content type of message (e.g. text/plain or text/html)

getFrom

public String getFrom()
Returns the message's from field.

Returns:
java.lang.String

getReplyTo

public List getReplyTo()
Gets a list of address to reply to.


getSubject

public String getSubject()
Returns the subject of the message.

Returns:
String

getTo

public List getTo()
Gets the recipients of the message.

Returns:
ArrayList

isAuthenticate

public boolean isAuthenticate()
Should we authenticate with the server before sending mail? Some SMTP servers require it while others don't. Creation date: (2/24/2004 3:22:31 PM) Paul Holm

Returns:
boolean

setAttachments

public void setAttachments(List attachments)
Sets the attachment file names for the message.


setAuthenticate

public void setAuthenticate(boolean newMAuthenticate)
Should we authenticate with the server before sending mail? Some SMTP servers require it while others don't. Creation date: (2/24/2004 3:22:31 PM) Paul Holm

Parameters:
newMAuthenticate - boolean

setBcc

public void setBcc(List bcc)
Sets the recipients of the message blindcopy.


setBody

public void setBody(String body)
Sets the body of the message.

Parameters:
body - String

setCc

public void setCc(List cc)
Sets the recipients of the message copy.


setContentType

public void setContentType(String contentType)
Sets the content type of this message.

Parameters:
contentType - mime type of message (e.g. text/plain or text/html)

setFrom

public void setFrom(String from)
Sets the message's from field.

Parameters:
from - StringString

setReplyTo

public void setReplyTo(List replyTo)
Sets the recipients of the message.


setSubject

public void setSubject(String subject)
Sets the subject of the message.

Parameters:
subject - String

setTo

public void setTo(String to)
Sets the recipients of the message.


setTo

public void setTo(List to)
Sets the recipients of the message.