|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.framework.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.framework.mail.MailMessage |
---|
PART_INLINE, PART_REF, PLAIN_TEXT, TEXT_HTML, TEXT_XML |
Constructor Summary | |
---|---|
EMailMessage(java.lang.String from,
java.lang.String to,
java.lang.String subject,
java.lang.String messageBody)
Creates a new mail message with MIME type text/plain. |
|
EMailMessage(java.lang.String from,
java.lang.String to,
java.lang.String subject,
java.lang.String messageBody,
java.lang.String mimeType)
Creates a new mail message with the given MIME type. |
Method Summary | |
---|---|
java.lang.String |
getHeader()
Return mail header including sender, receiver and subject. |
java.lang.String |
getMessageBody()
Method declaration |
java.lang.String |
getMimeType()
Gets the mimeType attribute of the EMailMessage object |
java.lang.String |
getReceiver()
Method declaration |
java.lang.String |
getSender()
Method declaration |
java.lang.String |
getSubject()
Gets the subject attribute of the EMailMessage object |
boolean |
isValid()
Returns the state of this message. |
void |
setMessageBody(java.lang.String message)
Method declaration |
void |
setMimeType(java.lang.String mimeType)
Sets the mimeType attribute of the EMailMessage object |
void |
setReceiver(java.lang.String to)
Method declaration |
void |
setSender(java.lang.String from)
Method declaration |
void |
setSubject(java.lang.String title)
Method declaration |
java.lang.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(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String messageBody)
from
- the senderto
- the receiver listsubject
- the subjectmessageBody
- the content of the messagepublic EMailMessage(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String messageBody, java.lang.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 java.lang.String getHeader()
getHeader
in interface MailMessage
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSender()
getSender
in interface MailMessage
public java.lang.String getMessageBody()
getMessageBody
in interface MailMessage
public java.lang.String getReceiver()
getReceiver
in interface MailMessage
public void setReceiver(java.lang.String to)
setReceiver
in interface MailMessage
to
- public void setMessageBody(java.lang.String message)
setMessageBody
in interface MailMessage
message
- public void setSender(java.lang.String from)
setSender
in interface MailMessage
from
- public void setSubject(java.lang.String title)
setSubject
in interface MailMessage
title
- public java.lang.String getSubject()
getSubject
in interface MailMessage
public void setMimeType(java.lang.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 java.lang.String getMimeType()
getMimeType
in interface MailMessage
Part.getContentType()
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org