|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQMailMessage
This interface defines an email message which can be delivered to recipients via either
AQSmtpServer
or AQMailQueue
.
AQMailMessage
interface
can be instantiated via aqua.mail.newMessage()
alias.
Method Summary | |
---|---|
void |
addBCCRecipient(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,
String attachmentName)
Adds a byte array as an attachment. |
void |
addCCRecipient(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(File filename)
Add a file on the local file system as an attachment. |
void |
addFileAttachment(String filename)
Add a file on the local file system as an attachment. |
void |
addFileAttachment(String filename,
String attachmentName)
Add a file on the local file system as an attachment with attachment name specified. |
void |
addHadoopFileAttachment(AQHadoopDistributedFileSystem system,
String filename,
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,
String attachmentName)
Adds a AQProjectFile as an attachment. |
void |
addReplyTo(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(String recipient)
Add a valid email address, or a list of comma separated email addresses, to the list of recipients. |
String[] |
getBCCRecipients()
Returns a list of BCC: recipients, an empty array is returned if recipients are not defined. |
String[] |
getCCRecipients()
Returns a list of CC: recipients, an empty array is returned if recipients are not defined. |
String[] |
getFileAttachments()
Returns the list of file attachments, an empty array is returned if this message contains no file attachments. |
String |
getFrom()
Returns message sender email address or null if the address is not defined. |
String |
getHtmlText()
Returns message HTML text content or null if the HTML content is not defined. |
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. |
String |
getSubject()
Returns message subject or null if the message subject is not defined. |
String |
getText()
Returns message plain text content or null if the plain text content is not defined. |
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(String sender)
Sets sender email address. |
void |
setHtmlText(String htmlText)
Set message HTML content. |
void |
setSubject(String subject)
Set message subject. |
void |
setText(String text)
Set message plain text content. |
Method Detail |
---|
void setFrom(String sender)
sender
- Sender email address.String getFrom()
void addToRecipient(String recipient)
recipient
- To: email address, or a list of comma separated email addresses.String[] getToRecipients()
void addCCRecipient(String address)
address
- CC: email address, or a list of comma separated email addresses.String[] getCCRecipients()
void addBCCRecipient(String address)
address
- BCC: email address, or a list of comma separated email addresses.String[] getBCCRecipients()
void addReplyTo(String replyTo)
replyTo
- email address, or a list of comma separated email addresses.String[] getReplyTo()
void setSubject(String subject)
subject
- Message subject.String getSubject()
void setText(String text)
text
- Message plain text content, ignored if null.String getText()
void setHtmlText(String htmlText)
htmlText
- Message HTML content, ignored if null.String getHtmlText()
void addFileAttachment(String filename) throws Exception
filename
- the file name.
Exception
- if the specified file does not exist or inaccessiblevoid addFileAttachment(File filename) throws Exception
filename
- the file name.
Exception
- if the specified file does not exist or inaccessiblevoid addFileAttachment(String filename, String attachmentName) throws Exception
filename
- the file name.attachmentName
- the name to be used to name the attachment
Exception
- if the specified file does not exist or inaccessibleString[] getFileAttachments()
addFileAttachment(String filename)
or addFileAttachment(File filename)
.
void addByteArrayAttachment(byte[] bytes, 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, String attachmentName)
AQProjectFile
as an attachment.
file
- the project fileattachmentName
- the name to be used to name the attachmentvoid addHadoopFileAttachment(AQHadoopDistributedFileSystem system, String filename, String attachmentName) throws 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 attachment
Exception
- if the specified file does not exist or inaccessiblevoid send() throws Exception
AQSmtpServer
.
Exception
void queue() throws Exception
AQMailQueue
.
Exception
|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |