public static interface EmailService.Email
Email can be reused to send multiple email
messages.
The send and copy list should be a comma separated sequence of addresses that must follow RFC822 syntax. The following example is valid:
setSendList("\"Sample Email 1\"<sample1@emailaddress.com>, sample2@emailadress.com");
| Modifier and Type | Field and Description |
|---|---|
static String |
IMPORTANT_LESS |
static String |
IMPORTANT_MORE |
static String |
IMPORTANT_NORMAL |
static String |
SENSITIVE_CONFIDENTIAL |
static String |
SENSITIVE_NORMAL |
static String |
SENSITIVE_PERSONAL |
static String |
SENSITIVE_PRIVATE |
| Modifier and Type | Method and Description |
|---|---|
File |
addAttachment(String attachmentName,
File attachmentFile)
Adds a file attachment to this
Email. |
Map<String,File> |
getAttachments()
Returns a map as a copy of the email attachments with the attachment
name as the key, and the file attachment as the
value.
|
String |
getCopyList()
Returns the list of recipients to copy for this
Email. |
String |
getImportance()
Returns the 'importance' value for the
Email |
String |
getMessage()
Returns the message for this
Email. |
String |
getSendList()
Returns the list of recipients for this
Email. |
String |
getSensitivity()
Returns the 'sensitivity' value for the
Email |
String |
getSubject()
Returns the subject for this
Email. |
File |
removeAttachment(String attachmentName)
Removes a file attachment from this
Email if present. |
void |
setCopyList(String copyList)
Set the list of recipients to copy for this
Email. |
void |
setImportance(String importance)
Sets the 'importance' value for the
Email. |
void |
setMessage(String message)
Sets the message for this
Email. |
void |
setSendList(String sendList)
Set the list of recipients to send this
Email. |
void |
setSensitivity(String sensitivity)
Sets the 'sensitivity' value for the
Email. |
void |
setSubject(String subject)
Sets the subject for this
Email. |
static final String IMPORTANT_LESS
static final String IMPORTANT_NORMAL
static final String IMPORTANT_MORE
static final String SENSITIVE_NORMAL
static final String SENSITIVE_PERSONAL
static final String SENSITIVE_PRIVATE
static final String SENSITIVE_CONFIDENTIAL
String getSendList()
Email.EmailsetSendList(java.lang.String)void setSendList(String sendList)
Email. The
sendList should be a comma separated sequence of addresses that must
follow RFC822 syntax.sendList - getSendList()String getCopyList()
Email.EmailsetCopyList(java.lang.String)void setCopyList(String copyList)
Email. The
copyList should be a comma separated sequence of addresses that must
follow RFC822 syntax.copyList - getCopyList()String getSubject()
Email.Emailvoid setSubject(String subject)
Email.subject - the subject to setString getMessage()
Email.Emailvoid setMessage(String message)
Email.message - the message to setString getImportance()
EmailEmailsetImportance(java.lang.String)void setImportance(String importance)
Email. Valid values
are IMPORTANT_LESS, IMPORTANT_NORMAL,
IMPORTANT_MORE, and null to clear.importance - the value to set or null to clearString getSensitivity()
EmailEmailsetSensitivity(java.lang.String)void setSensitivity(String sensitivity)
Email. Valid values
are SENSITIVE_NORMAL, SENSITIVE_PERSONAL,
SENSITIVE_PRIVATE, SENSITIVE_CONFIDENTIAL, and
null to clear.sensitivity - the value to set or null to clearFile addAttachment(String attachmentName, File attachmentFile)
Email. If the
Email previously contained an attachment with the specified
attachmentName, the old File is replaced.attachmentName - the name for the file attachmentattachmentFile - the file to attachNullPointerException - if the attachmentName or attachmentFile is nullFile removeAttachment(String attachmentName)
Email if present.attachmentName - the name for the file attachmentMap<String,File> getAttachments()