|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 messagepublic 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 supportedMethod Detail |
---|
public boolean isValid()
isValid
in interface MailMessage
true
if sender and receiver are not null
, otherwise
false
public String getHeader()
getHeader
in interface MailMessage
public String toString()
toString
in class Object
public String getSender()
getSender
in interface MailMessage
public String getMessageBody()
getMessageBody
in interface MailMessage
public String getReceiver()
getReceiver
in interface MailMessage
public void setReceiver(String to)
setReceiver
in interface MailMessage
to
- public void setMessageBody(String message)
setMessageBody
in interface MailMessage
message
- public void setSender(String from)
setSender
in interface MailMessage
from
- public void setSubject(String title)
setSubject
in interface MailMessage
title
- public String getSubject()
getSubject
in interface MailMessage
public void setMimeType(String mimeType) throws UnknownMimeTypeException
setMimeType
in interface MailMessage
mimeType
- 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 MailMessage
Part.getContentType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |