flux.notification
Interface MailAction

All Superinterfaces:
Action, java.lang.Cloneable, RuntimeDataMap, java.io.Serializable

public interface MailAction
extends Action

Using an email template at flow chart construction time, constructs and sends a concrete email at runtime. The mail action sends email through an SMTP mail server.

Internally, email addresses are created by passing the email address text through the javax.mail.internet.InternetAddress class, which is part of the JavaMail API. Consequently, email addresses in the following forms can be used through the mail action:

Author:
Copyright 2014 Flux Corporation. All rights reserved.

Method Summary
 java.util.List<java.net.URL> getAttachments()
          Returns the mail attachments for this mail.
 java.util.List<java.lang.String> getBccAddresses()
          Returns the BCC addresses for this mail.
 java.lang.String getBody()
          Sets the contents of the email message.
 java.lang.String getBodyFooter()
          Returns the end of the body of this mail.
 java.lang.String getBodyHeader()
          Returns the beginning of the body of this mail.
 java.util.Properties getBodyProperties()
          Returns substitution properties that are referenced by the mail body.
 java.util.List<java.lang.String> getCcAddresses()
          Returns the CC addresses for this mail.
 MailContentType getContentType()
          Returns the email content type for this mail.
 java.util.Properties getExtraHeaders()
          Returns additional mail headers that accompany this mail.
 java.lang.String getFromAddress()
          Returns the FROM address for this mail.
 java.lang.String getMailServer()
          Returns the name of the mail server through which this mail is sent.
 java.lang.String getPassword()
          Returns the password that will be used to authenticate with the mail server.
 int getPort()
          Returns the port that will be used to connect to the mail server.
 boolean getSsl()
          Returns whether or not this action will use SSL to connect to the mail server.
 java.lang.String getSubject()
          Returns the subject of this mail.
 java.util.List<java.lang.String> getToAddresses()
          Returns the TO addresses for this mail.
 java.lang.String getUsername()
          Returns the username that will be used to authenticate with the mail server.
 void setAttachments(java.util.List<java.net.URL> attachments)
          Sets the mail attachments for this mail.
 void setBccAddresses(java.util.List<java.lang.String> bccAddresses)
          Sets the BCC addresses for this mail.
 void setBody(java.lang.String body)
          Sets the contents of the email message.
 void setBodyFooter(java.lang.String bodyFooter)
          Sets the end of the body of this mail.
 void setBodyHeader(java.lang.String bodyHeader)
          Sets the beginning of the body of this mail.
 void setBodyProperties(java.util.Properties bodyProperties)
          Sets substitution properties that are referenced by the mail body.
 void setCcAddresses(java.util.List<java.lang.String> ccAddresses)
          Sets the CC addresses for this mail.
 void setContentType(MailContentType mailContentType)
          Sets the email content type for this mail.
 void setExtraHeaders(java.util.Properties extraHeaders)
          Sets additional mail headers that accompany this mail.
 void setFromAddress(java.lang.String fromAddress)
          Sets the FROM address for this mail.
 void setMailServer(java.lang.String mailServer)
          Sets the name of the mail server through which this mail is sent.
 void setPassword(java.lang.String password)
          Sets the password that will be used to authenticate with the mail server.
 void setPort(int port)
          Sets the port that will be used to connect to the mail server.
 void setSsl(boolean ssl)
          Sets whether or not to use SSL for the connection to the mail server.
 void setSubject(java.lang.String subject)
          Sets the subject of this mail.
 void setToAddresses(java.util.List<java.lang.String> toAddresses)
          Sets the TO addresses for this mail.
 void setUsername(java.lang.String username)
          Sets the username that will be used to authenticate with the mail server.
 
Methods inherited from interface flux.Action
addFlow, addFlow, addSignalFlow, clone, execute, getDescription, getFlows, getHiddenVariableNames, getJoinExpression, getName, getPostscript, getPostscriptLanguage, getPrescript, getPrescriptLanguage, getResultInfo, getSignalsToMonitor, getTimeoutBusinessInterval, getTimeoutBusinessIntervalNamespace, getTimeoutExpression, getVariableManager, isEndOfRun, isJoinPoint, isSkippable, isStartAction, isStartOfRun, isTransactionBreak, removeFlow, reset, setDescription, setElseFlow, setEndOfRun, setErrorFlow, setErrorFlowWithoutRollback, setErrorFlowWithRollback, setJoinExpression, setJoinPoint, setName, setPostscript, setPostscriptLanguage, setPrescript, setPrescriptLanguage, setSignalsToMonitor, setSkippable, setStartAction, setStartOfRun, setTimeoutBusinessInterval, setTimeoutBusinessIntervalNamespace, setTimeoutExpression, setTimeoutFlow, setTransactionBreak, verify, verifyOnClient
 
Methods inherited from interface flux.runtimedatamap.RuntimeDataMap
getRuntimeDataMap, setRuntimeDataMap
 

Method Detail

getAttachments

java.util.List<java.net.URL> getAttachments()
                                            throws EngineException
Returns the mail attachments for this mail. The mail attachments are specified as a list of pointers to files on the local file system.

Returns:
The mail attachments for this mail. Does not return null.
Throws:
EngineException - If a system error occurs.

getBccAddresses

java.util.List<java.lang.String> getBccAddresses()
Returns the BCC addresses for this mail. BCC addresses can contain a reference to the logged in user who added this mail action to a Flux engine.

Returns:
The BCC addresses for this mail. Does not return null.

getBody

java.lang.String getBody()
Sets the contents of the email message. If the body contains the symbol "${my property}", then the body property called "my property" is substituted for "${my property}" before the email is sent. These body properties are available via the getBodyProperties() and setBodyProperties() methods.

Returns:
The contents of the email message. Defaults to null.
See Also:
getBodyProperties(), setBodyProperties(java.util.Properties)

getBodyFooter

java.lang.String getBodyFooter()
Returns the end of the body of this mail.

Returns:
The end of the body of this mail. Defaults to null.

getBodyHeader

java.lang.String getBodyHeader()
Returns the beginning of the body of this mail.

Returns:
The beginning of the body of this mail. Defaults to null.

getBodyProperties

java.util.Properties getBodyProperties()
Returns substitution properties that are referenced by the mail body.

Returns:
Substitution properties that are referenced by the mail body.

getCcAddresses

java.util.List<java.lang.String> getCcAddresses()
Returns the CC addresses for this mail. CC addresses can contain a reference to the logged in user who added this mail action to a Flux engine.

Returns:
The CC addresses for this mail. Does not return null.

getContentType

MailContentType getContentType()
Returns the email content type for this mail. Defaults to "text/plain".

Returns:
The email content type for this mail.

getExtraHeaders

java.util.Properties getExtraHeaders()
Returns additional mail headers that accompany this mail.

Returns:
Additional mail headers that accompany this mail.

getFromAddress

java.lang.String getFromAddress()
Returns the FROM address for this mail. FROM address can contain a reference to the logged in user who added this mail action to a Flux engine.

Returns:
The FROM address for this mail. Defaults to null.

getMailServer

java.lang.String getMailServer()
Returns the name of the mail server through which this mail is sent.

Returns:
The name of the mail server through which this mail is sent. Defaults to null.

getPassword

java.lang.String getPassword()
Returns the password that will be used to authenticate with the mail server. Mail server authentication is not enabled if the username is null or empty.

Returns:
The password that will be used to authenticate with the mail server.

getPort

int getPort()
Returns the port that will be used to connect to the mail server. Defaults to the standard SMTP port, which is port 25.

Returns:
The port that will be used to connect to the mail server.

getSsl

boolean getSsl()
Returns whether or not this action will use SSL to connect to the mail server.

Returns:
Whether or not this action will use SSL to connect to the mail server.

getSubject

java.lang.String getSubject()
Returns the subject of this mail.

Returns:
The subject of this mail. Defaults to null.

getToAddresses

java.util.List<java.lang.String> getToAddresses()
Returns the TO addresses for this mail. TO addresses can contain a reference to the logged in user who added this mail action to a Flux engine.

Returns:
The TO addresses for this mail. Does not return null.

getUsername

java.lang.String getUsername()
Returns the username that will be used to authenticate with the mail server. Mail server authentication will not be used if the username is null or empty.

Defaults to null, and, as a result, no mail server authentication occurs.

Returns:
The username that will be used to authenticate with the mail server.

setAttachments

void setAttachments(java.util.List<java.net.URL> attachments)
Sets the mail attachments for this mail. The mail attachments are specified as a list of pointers to files on the local file system.

Parameters:
attachments - The mail attachments for this mail.

setBccAddresses

void setBccAddresses(java.util.List<java.lang.String> bccAddresses)
Sets the BCC addresses for this mail. BCC addresses can contain a reference to the logged in user who added this mail action to a Flux engine.

Parameters:
bccAddresses - The BCC addresses for this mail.

setBody

void setBody(java.lang.String body)
Sets the contents of the email message. If the body contains the symbol "${my property}", then the body property called "my property" is substituted for "${my property}" before the email is sent. These body properties are available via the getBodyProperties() and setBodyProperties() methods.

Parameters:
body - The contents of the email message.
See Also:
getBodyProperties(), setBodyProperties(java.util.Properties)

setBodyFooter

void setBodyFooter(java.lang.String bodyFooter)
Sets the end of the body of this mail.

Parameters:
bodyFooter - The end of the body of this mail.

setBodyHeader

void setBodyHeader(java.lang.String bodyHeader)
Sets the beginning of the body of this mail.

Parameters:
bodyHeader - The beginning of the body of this mail.

setBodyProperties

void setBodyProperties(java.util.Properties bodyProperties)
Sets substitution properties that are referenced by the mail body.

Parameters:
bodyProperties - Substitution properties that are referenced by the mail body.

setCcAddresses

void setCcAddresses(java.util.List<java.lang.String> ccAddresses)
Sets the CC addresses for this mail. CC addresses can contain a reference to the logged in user who added this mail action to a Flux engine.

Parameters:
ccAddresses - The CC addresses for this mail.

setContentType

void setContentType(MailContentType mailContentType)
Sets the email content type for this mail.

Parameters:
mailContentType - The email content type for this mail.

setExtraHeaders

void setExtraHeaders(java.util.Properties extraHeaders)
Sets additional mail headers that accompany this mail.

Parameters:
extraHeaders - Additional mail headers that accompany this mail.

setFromAddress

void setFromAddress(java.lang.String fromAddress)
Sets the FROM address for this mail. The FROM address can contain a reference to the logged in user who added this mail action to a Flux engine.

Parameters:
fromAddress - The FROM address for this mail.

setMailServer

void setMailServer(java.lang.String mailServer)
Sets the name of the mail server through which this mail is sent.

Parameters:
mailServer - The name of the mail server through which this mail is sent.

setPassword

void setPassword(java.lang.String password)
Sets the password that will be used to authenticate with the mail server. Mail server authentication is not enabled if the username is null or empty.

Parameters:
password - The password that will be used to authenticate with the mail server.

setPort

void setPort(int port)
Sets the port that will be used to connect to the mail server.

Parameters:
port - The port that will be used to connect to the mail server.

setSubject

void setSubject(java.lang.String subject)
Sets the subject of this mail.

Parameters:
subject - The subject of this mail.

setSsl

void setSsl(boolean ssl)
Sets whether or not to use SSL for the connection to the mail server.

Parameters:
ssl - Whether or not to use SSL for the connection to the mail server.

setToAddresses

void setToAddresses(java.util.List<java.lang.String> toAddresses)
Sets the TO addresses for this mail. TO addresses can contain a reference to the logged in user who added this mail action to a Flux engine.

Parameters:
toAddresses - The TO addresses for this mail.

setUsername

void setUsername(java.lang.String username)
Sets the username that will be used to authenticate with the mail server. Mail server authentication will not be used if the username is null or empty.

A null or empty username disables mail server authentication.

Parameters:
username - The username that will be used to authenticate with the mail server.


© 2014 Flux Corporation. All rights reserved.