public interface AQMailMessage
AQSmtpServer or AQMailQueue.
An instance of the object that implements the AQMailMessage interface
can be instantiated via aqua.mail.newMessage() alias.
| Modifier and Type | Method and Description |
|---|---|
void |
addBCCRecipient(java.lang.String address)
Add a valid email address, or a list of comma separated email addresses, to the list of blind carbon copy (BCC:) recipients.
|
void |
addByteArrayAttachment(byte[] bytes,
java.lang.String attachmentName)
Adds a byte array as an attachment.
|
void |
addCCRecipient(java.lang.String address)
Add a valid email address, or a list of comma separated email addresses, to the list of carbon copy (CC:) recipients.
|
void |
addFileAttachment(java.io.File filename)
Add a file on the local file system as an attachment.
|
void |
addFileAttachment(java.lang.String filename)
Add a file on the local file system as an attachment.
|
void |
addFileAttachment(java.lang.String filename,
java.lang.String attachmentName)
Add a file on the local file system as an attachment with attachment name specified.
|
void |
addHadoopFileAttachment(AQHadoopDistributedFileSystem system,
java.lang.String filename,
java.lang.String attachmentName)
Add a file on a Hadoop file system as an attachment.
|
void |
addProjectFileAttachment(AQProjectFile file)
Adds a
AQProjectFile as an attachment. |
void |
addProjectFileAttachment(AQProjectFile file,
java.lang.String attachmentName)
Adds a
AQProjectFile as an attachment. |
void |
addReplyTo(java.lang.String replyTo)
Add a valid email address, or a list of comma separated email addresses, to the list of addresses to which replies should be directed.
|
void |
addToRecipient(java.lang.String recipient)
Add a valid email address, or a list of comma separated email addresses, to the list of recipients.
|
java.lang.String[] |
getBCCRecipients()
Returns a list of BCC: recipients, an empty array is returned if recipients are not defined.
|
java.lang.String[] |
getCCRecipients()
Returns a list of CC: recipients, an empty array is returned if recipients are not defined.
|
java.lang.String[] |
getFileAttachments()
Returns the list of file attachments, an empty array is returned if this message contains no file attachments.
|
java.lang.String |
getFrom()
Returns message sender email address or null if the address is not defined.
|
java.lang.String |
getHtmlText()
Returns message HTML text content or null if the HTML content is not defined.
|
java.lang.String[] |
getReplyTo()
Returns the list of addresses to which replies should be directed, an empty array is returned if Reply-To addresses are not defined.
|
java.lang.String |
getSubject()
Returns message subject or null if the message subject is not defined.
|
java.lang.String |
getText()
Returns message plain text content or null if the plain text content is not defined.
|
java.lang.String[] |
getToRecipients()
Returns a list of recipients, an empty array is returned if recipients are not defined.
|
void |
queue()
Delivers this message to recipients using the default
AQMailQueue. |
void |
send()
Delivers this message to recipients using the default
AQSmtpServer. |
void |
setFrom(java.lang.String sender)
Sets sender email address.
|
void |
setHtmlText(java.lang.String htmlText)
Set message HTML content.
|
void |
setSubject(java.lang.String subject)
Set message subject.
|
void |
setText(java.lang.String text)
Set message plain text content.
|
void setFrom(java.lang.String sender)
sender - Sender email address.java.lang.String getFrom()
void addToRecipient(java.lang.String recipient)
recipient - To: email address, or a list of comma separated email addresses.java.lang.String[] getToRecipients()
void addCCRecipient(java.lang.String address)
address - CC: email address, or a list of comma separated email addresses.java.lang.String[] getCCRecipients()
void addBCCRecipient(java.lang.String address)
address - BCC: email address, or a list of comma separated email addresses.java.lang.String[] getBCCRecipients()
void addReplyTo(java.lang.String replyTo)
replyTo - email address, or a list of comma separated email addresses.java.lang.String[] getReplyTo()
void setSubject(java.lang.String subject)
subject - Message subject.java.lang.String getSubject()
void setText(java.lang.String text)
text - Message plain text content, ignored if null.java.lang.String getText()
void setHtmlText(java.lang.String htmlText)
htmlText - Message HTML content, ignored if null.java.lang.String getHtmlText()
void addFileAttachment(java.lang.String filename)
throws java.lang.Exception
filename - the file name.java.lang.Exception - if the specified file does not exist or inaccessiblevoid addFileAttachment(java.io.File filename)
throws java.lang.Exception
filename - the file name.java.lang.Exception - if the specified file does not exist or inaccessiblevoid addFileAttachment(java.lang.String filename,
java.lang.String attachmentName)
throws java.lang.Exception
filename - the file name.attachmentName - the name to be used to name the attachmentjava.lang.Exception - if the specified file does not exist or inaccessiblejava.lang.String[] getFileAttachments()
addFileAttachment(String filename) or addFileAttachment(File filename).void addByteArrayAttachment(byte[] bytes,
java.lang.String attachmentName)
bytes - the byte arrayattachmentName - the name to be used to name the attachmentvoid addProjectFileAttachment(AQProjectFile file)
AQProjectFile as an attachment.
The base name of the specified file will be used as attachment name.file - the project filevoid addProjectFileAttachment(AQProjectFile file, java.lang.String attachmentName)
AQProjectFile as an attachment.file - the project fileattachmentName - the name to be used to name the attachmentvoid addHadoopFileAttachment(AQHadoopDistributedFileSystem system, java.lang.String filename, java.lang.String attachmentName) throws java.lang.Exception
system - the Hadoop file system where file is locatedfilename - the name of the file on the Hadoop file systemattachmentName - the name to be used to name the attachmentjava.lang.Exception - if the specified file does not exist or inaccessiblevoid send() throws java.lang.Exception
AQSmtpServer.java.lang.Exception - On errorvoid queue()
throws java.lang.Exception
AQMailQueue.java.lang.Exception - On error
Copyright © 2019 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.