|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.objectplanet.survey.plugin.api.Email
public class Email
Object that represents an email. Example of email creation:
try {
Email email = new Email(fromName, fromEmail,
toEmail,subject, message,
type);
} catch (Throwable e) {
//Do something
}
| Constructor Summary | |
|---|---|
Email(java.lang.String fromName,
java.lang.String fromEmail,
java.lang.String toEmail,
java.lang.String subject,
java.lang.String message,
java.lang.String type)
Constructor for the email to one recipient |
|
| Method Summary | |
|---|---|
void |
addAttachment(java.lang.String filename,
java.lang.String file)
Add attachment to the email |
void |
addRecipient(java.lang.String emailAddress)
Add a recipient |
void |
createMessage(java.lang.String fromName,
java.lang.String fromEmail,
java.lang.String subject,
java.lang.String message,
java.lang.String type)
Create an email message |
com.objectplanet.survey.util.Email |
getEmailObject()
Gets the save value |
java.lang.String |
getEmailType()
Gets the email type |
long |
getFailedId()
Get the failed id. |
boolean |
getSave()
Gets the save value |
void |
setEmailType(java.lang.String emailType)
Set the id of the email if failed |
void |
setFailedId(long failedId)
Set the id of the email if failed |
void |
setSave(boolean saveToFailedEmails)
Set the save variable |
java.lang.String |
toLogString()
Return string object for this email (used for logging) |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Email(java.lang.String fromName,
java.lang.String fromEmail,
java.lang.String toEmail,
java.lang.String subject,
java.lang.String message,
java.lang.String type)
throws EmailCreationException,
javax.mail.internet.AddressException
fromName - Who sends the message (name)fromEmail - Who sends the message(email address)toEmail - Recipients' emailsubject - The subject of the emailmessage - The body of the messagetype - The type of the message (text/plain or text/html)
EmailCreationException - Error during email creation
javax.mail.internet.AddressException - Error during recipient creation| Method Detail |
|---|
public void createMessage(java.lang.String fromName,
java.lang.String fromEmail,
java.lang.String subject,
java.lang.String message,
java.lang.String type)
throws com.objectplanet.survey.util.EmailCreationException
fromName - Who sends the message (name)fromEmail - Who sends the message(email address)subject - The subject of the emailmessage - The body of the messagetype - The type of the message body (text/plain or text/html)
EmailCreationException - If error
com.objectplanet.survey.util.EmailCreationException
public void addAttachment(java.lang.String filename,
java.lang.String file)
throws java.io.IOException,
javax.mail.MessagingException
filename - Visible file name ("myFile.txt")file - File path
java.io.IOException - IOException
javax.mail.MessagingException - MessagingException
public void addRecipient(java.lang.String emailAddress)
throws javax.mail.internet.AddressException
newRecipient - Recipient to add
javax.mail.internet.AddressException - Error during recipient creationpublic java.lang.String toLogString()
public void setEmailType(java.lang.String emailType)
emailType - The new email type (text/plain or text/html)public void setFailedId(long failedId)
failedId - The new idpublic void setSave(boolean saveToFailedEmails)
saveToFailedEmails - True if the email should be saved to failed
mails in case it failspublic long getFailedId()
public java.lang.String getEmailType()
public boolean getSave()
public com.objectplanet.survey.util.Email getEmailObject()
|
Copyright ? ObjectPlanet Inc. All Rights Reserved. | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||