|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lavantech.net.mail.Message
This class represents a Email Message that can be emailed. The Message has information on From Email Address, To Email Addresses, CC Email Addresses, BCC Email Addresses, Subject, Message and Attachments.
| Field Summary | |
EmailAddress[] |
bcc
|
EmailAddress[] |
cc
|
java.lang.String |
charset
|
java.util.Calendar |
dateTime
|
EmailAddress |
from
|
java.lang.String |
message
|
EmailAddress |
replyTo
|
EmailAddress |
returnPath
|
java.lang.String |
subject
|
EmailAddress[] |
to
|
| Constructor Summary | |
Message(EmailAddress from,
EmailAddress[] to,
EmailAddress[] cc,
EmailAddress[] bcc,
java.lang.String subject,
java.lang.String message)
Constructs a message with the given From address, To addresss, CC addresses, BCC addresses, Subject and Message. |
|
Message(EmailAddress returnPath,
EmailAddress from,
EmailAddress replyTo,
EmailAddress[] to,
EmailAddress[] cc,
EmailAddress[] bcc,
java.lang.String subject,
java.lang.String message,
java.lang.String charset,
java.io.File[] attachments)
Constructs a message with more details than the simple constructor. |
|
| Method Summary | |
void |
addAttachment(java.io.File file)
Add an attachment to the message. |
java.io.File[] |
getAttachments()
Returns an array of attachments in the message. |
java.util.Calendar |
getDateTime()
Returns the message Date and Time. |
void |
removeAttachment(java.io.File file)
Remove an attachment to the message. |
void |
setDateTime(java.util.Calendar cal)
Sets the message Date and Time. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public EmailAddress from
public EmailAddress replyTo
public EmailAddress returnPath
public EmailAddress[] to
public EmailAddress[] cc
public EmailAddress[] bcc
public java.lang.String subject
public java.lang.String message
public java.lang.String charset
public java.util.Calendar dateTime
| Constructor Detail |
public Message(EmailAddress from,
EmailAddress[] to,
EmailAddress[] cc,
EmailAddress[] bcc,
java.lang.String subject,
java.lang.String message)
from - From Email Address. FromAddress is mandatory for this message to be mailable.to - An array of To Email Addresses. This can be null, if there is no "To" Address.cc - An array of CC Email Addresses. This can be null, if there is no "CC" Address.bcc - An array of BCC Email Addresses. This can be null, if there is no "BCC" Address.subject - Subject of the message. This can be null.message - Message to be sent. This can't be null.
public Message(EmailAddress returnPath,
EmailAddress from,
EmailAddress replyTo,
EmailAddress[] to,
EmailAddress[] cc,
EmailAddress[] bcc,
java.lang.String subject,
java.lang.String message,
java.lang.String charset,
java.io.File[] attachments)
throws java.io.UnsupportedEncodingException
returnPath - Email Address where errors are sent in case of failed delivery. This is useful
for mailing list where bounced mails shouldn't go back to the mailing list.from - From Email Address. FromAddress is mandatory for this message to be mailable.replyTo - Email Address where reply for this mail will be sent. This could be different from
the From Address.to - An array of To Email Addresses. This can be null, if there is no "To" Address.cc - An array of CC Email Addresses. This can be null, if there is no "CC" Address.bcc - An array of BCC Email Addresses. This can be null, if there is no "BCC" Address.subject - Subject of the message. This can be null.message - Message to be sent. This can't be null.charset - Canonical name of the character set of the message.attachments - Array of files that needs to be attached to the message. null can be passed if no attachments.| Method Detail |
public void addAttachment(java.io.File file)
throws AttachmentException
file - Attachment file that needs to be added to the message.
AttachmentException - If the Attachment File doesn't exists or can't be read.public void removeAttachment(java.io.File file)
file - Attachment file that needs to be removed from the message.public java.io.File[] getAttachments()
public void setDateTime(java.util.Calendar cal)
public java.util.Calendar getDateTime()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||