|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.util.mail.MailMessage
An email message. This is the base class for all types of email messages in the outgoing mail queue. The queue will iterate over all the message recipients one by one and send each one a single unique message. Due to queueing considerations, it is possible that other messages are delivered before all emails have been generated for a message.
| Constructor Summary | |
MailMessage()
|
|
| Method Summary | |
protected javax.mail.internet.MimeMessage |
createMessage(javax.mail.Session session,
javax.mail.internet.InternetAddress recipient)
Creates a Java mail MIME message. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value for a specified attribute. |
java.util.Collection |
getAttributeNames()
Returns a collection with all the attribute names. |
protected abstract javax.mail.internet.MimeMessage |
getNextMessage(javax.mail.Session session)
Creates the next Java mail MIME message from this mail message. |
abstract java.lang.String |
getRecipient()
Returns a string representation of the message recipient. |
java.lang.String |
getReplyTo()
Returns the message reply to address. |
javax.mail.internet.InternetAddress |
getReplyToAddress()
Returns the message reply to address. |
java.lang.String |
getSubject()
Returns the message subject. |
java.lang.String |
getText()
Returns the message text. |
protected abstract boolean |
hasMoreMessages()
Checks if there remains any Java mail MIME messages to generate. |
boolean |
isValid()
Checks if this message is valid. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets a message attribute value. |
void |
setReplyTo(java.lang.String address)
Sets the message reply-to address. |
void |
setSubject(java.lang.String subject)
Sets the message subject. |
void |
setText(java.lang.String text)
Sets the message text. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MailMessage()
| Method Detail |
public boolean isValid()
public abstract java.lang.String getRecipient()
public java.lang.String getReplyTo()
public javax.mail.internet.InternetAddress getReplyToAddress()
public void setReplyTo(java.lang.String address)
throws MailMessageException
address - the reply-to address
MailMessageException - if the reply-to address wasn't
possible to parse correctlypublic java.lang.String getSubject()
public void setSubject(java.lang.String subject)
subject - the message subjectpublic java.lang.String getText()
public void setText(java.lang.String text)
text - the message textpublic java.lang.String getAttribute(java.lang.String name)
name - the message attribute name
public java.util.Collection getAttributeNames()
public void setAttribute(java.lang.String name,
java.lang.String value)
name - the message attribute namevalue - the message attribute valueprotected abstract boolean hasMoreMessages()
protected abstract javax.mail.internet.MimeMessage getNextMessage(javax.mail.Session session)
throws MailMessageException
session - the Java mail session
MailMessageException - if the message couldn't be
created correctly
protected javax.mail.internet.MimeMessage createMessage(javax.mail.Session session,
javax.mail.internet.InternetAddress recipient)
throws MailMessageException
session - the Java mail sessionrecipient - the mail recipient
MailMessageException - if the message couldn't be
created correctly
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||