|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.mail.EMailMessage
public class EMailMessage
This class encapsulates all the info need to send an email message. This object is passed to the MailerEJB sendMail(...) method.
| Field Summary |
|---|
| Fields inherited from interface org.deegree.commons.mail.MailMessage |
|---|
PART_INLINE, PART_REF, PLAIN_TEXT, TEXT_HTML, TEXT_XML |
| Constructor Summary | |
|---|---|
EMailMessage(String from,
String to,
String subject,
String messageBody)
Creates a new mail message with MIME type text/plain. |
|
EMailMessage(String from,
String to,
String subject,
String messageBody,
String mimeType)
Creates a new mail message with the given MIME type. |
|
| Method Summary | |
|---|---|
String |
getHeader()
Return mail header including sender, receiver and subject. |
String |
getMessageBody()
Method declaration |
String |
getMimeType()
Gets the mimeType attribute of the EMailMessage object |
String |
getReceiver()
Method declaration |
String |
getSender()
Method declaration |
String |
getSubject()
Gets the subject attribute of the EMailMessage object |
boolean |
isValid()
Returns the state of this message. |
void |
setMessageBody(String message)
Method declaration |
void |
setMimeType(String mimeType)
Sets the mimeType attribute of the EMailMessage object |
void |
setReceiver(String to)
Method declaration |
void |
setSender(String from)
Method declaration |
void |
setSubject(String title)
Method declaration |
String |
toString()
Description of the Method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EMailMessage(String from,
String to,
String subject,
String messageBody)
from - the senderto - the receiver listsubject - the subjectmessageBody - the content of the message
public EMailMessage(String from,
String to,
String subject,
String messageBody,
String mimeType)
throws UnknownMimeTypeException
from - the senderto - the receiver listsubject - the subjectmessageBody - the content of the messagemimeType - the MIME type of the message body
UnknownMimeTypeException - if the given mimeType is not supported| Method Detail |
|---|
public boolean isValid()
isValid in interface MailMessagetrue if sender and receiver are not null, otherwise
falsepublic String getHeader()
getHeader in interface MailMessagepublic String toString()
toString in class Objectpublic String getSender()
getSender in interface MailMessagepublic String getMessageBody()
getMessageBody in interface MailMessagepublic String getReceiver()
getReceiver in interface MailMessagepublic void setReceiver(String to)
setReceiver in interface MailMessageto - public void setMessageBody(String message)
setMessageBody in interface MailMessagemessage - public void setSender(String from)
setSender in interface MailMessagefrom - public void setSubject(String title)
setSubject in interface MailMessagetitle - public String getSubject()
getSubject in interface MailMessage
public void setMimeType(String mimeType)
throws UnknownMimeTypeException
setMimeType in interface MailMessagemimeType - The new mimeType value
UnknownMimeTypeException - if the given MIME type is not supportedMailMessage.PLAIN_TEXT,
MailMessage.TEXT_HTML,
IETF MIME RFC,
Part.setContent(java.lang.Object, java.lang.String),
Part.setText(java.lang.String)public String getMimeType()
getMimeType in interface MailMessagePart.getContentType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||