flux.notification
Interface MailTrigger

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

public interface MailTrigger
extends Action

Monitors an email server for incoming mail and fires when email arrives.

The Mail Trigger returns its result in the flow context variable "RESULT". The following table contains more information on accessing and using the result.

Flow Context Variable Field Java Type Description
RESULTattachmentsjava.util.List<MailTrigger.MailAttachment>The file attachments in the mail message.
RESULTbodyjava.lang.StringThe body of the mail message.
RESULTcc_addressesjava.util.List<java.lang.String>The carbon copy recipients of the mail message.
RESULTcontent_typeMailContentTypeThe content type of the mail message.
RESULTfrom_addressesjava.util.List<java.lang.String>The senders of the mail message.
RESULTreply_to_addressesjava.util.List<java.lang.String>The reply-to addresses of the mail message.
RESULTsent_datejava.util.DateThe Date the mail message was sent.
RESULTsizeintThe size of the mail message.
RESULTstatus_flagsjavax.mail.FlagsStatus flags for the mail message.
RESULTsubjectjava.lang.StringThe subject of the mail message.
RESULTto_addressesjava.util.List<java.lang.String>The recipients of the mail message.

Author:
Copyright 2014 Flux Corporation. All rights reserved.

Nested Class Summary
static class MailTrigger.Mail_Attachment
          Deprecated. Use MailAttachment instead. Deprecated in Flux 7.2. Will be removed in Flux 8.0.
static class MailTrigger.Mail_Trigger_Result
          Deprecated. Use MailTriggerResult instead. Deprecated in Flux 7.2. Will be removed in Flux 8.0.
static class MailTrigger.MailAttachment
          Represents a file attachment to an email message.
static class MailTrigger.MailTriggerResult
          The result when a mail trigger fires.
 
Method Summary
 boolean getDeleteProcessedMessage()
          Returns whether a processed email is automatically deleted after control returns to the mail trigger.
 java.lang.String getImapFolder()
          Returns the name of the IMAP folder that is checked for email messages.
 java.lang.String getImapFolderCopyDestination()
          Returns the name of an IMAP folder, if any, to which a processed email is copied when the mail trigger fires.
 java.lang.String getPassword()
          Returns the password to access the mail server.
 java.lang.String getPollingDelay()
          Returns a time expression that specifies how long the mail trigger waits to poll the mail server for new email messages.
 int getPort()
          Returns the mail server port.
 MailProtocol getProtocol()
          Returns the mail protocol used to communicate with the mail server.
 java.lang.String getServer()
          Returns the host name of the email server.
 boolean getSsl()
          Returns whether or not this action will use SSL to connect to the mail server.
 java.lang.String getUsername()
          Returns the username to access the mail server.
 void setDeleteProcessedMessage(boolean deleteProcessedMessage)
          Sets whether a processed email is automatically deleted after control returns to the mail trigger.
 void setImapFolder(java.lang.String imapFolder)
          Sets the name of the IMAP folder that is checked for email messages.
 void setImapFolderCopyDestination(java.lang.String imapFolderCopyDestination)
          Sets the name of an IMAP folder, if any, to which a processed email is copied when the mail trigger fires.
 void setPassword(java.lang.String password)
          Sets the password to access the mail server.
 void setPollingDelay(java.lang.String timeExpression)
          Sets a time expression that specifies how long the mail trigger waits to poll the mail server for new email messages.
 void setPort(int port)
          Sets the mail server port.
 void setProtocol(MailProtocol mailProtocol)
          Sets the mail protocol used to communicate with the mail server.
 void setServer(java.lang.String server)
          Sets the host name of the email server.
 void setSsl(boolean ssl)
          Sets whether or not to use SSL for the connection to the mail server.
 void setUsername(java.lang.String username)
          Sets the username to access 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

getDeleteProcessedMessage

boolean getDeleteProcessedMessage()
Returns whether a processed email is automatically deleted after control returns to the mail trigger. Note that when using the POP3 protocol, the JavaMail implementation does not appear to allow messages to be deleted.

Returns:
Whether a processed email is automatically deleted after control returns to the mail trigger.

getImapFolder

java.lang.String getImapFolder()
Returns the name of the IMAP folder that is checked for email messages.

Returns:
The name of the IMAP folder that is checked for email messages.

getImapFolderCopyDestination

java.lang.String getImapFolderCopyDestination()
Returns the name of an IMAP folder, if any, to which a processed email is copied when the mail trigger fires.

Returns:
The name of an IMAP folder, if any, to which a processed email is copied when the mail trigger fires. May return null.

getPassword

java.lang.String getPassword()
Returns the password to access the mail server.

Returns:
The password to access the mail server.

getPollingDelay

java.lang.String getPollingDelay()
Returns a time expression that specifies how long the mail trigger waits to poll the mail server for new email messages.

Returns:
A time expression that specifies how long the mail trigger waits to poll the mail server for new email messages.

getPort

int getPort()
Returns the mail server port. Defaults to 25.

Returns:
The mail server port.

getProtocol

MailProtocol getProtocol()
                         throws EngineException
Returns the mail protocol used to communicate with the mail server. Defaults to IMAP.

Returns:
The mail protocol used to communicate with the mail server.
Throws:
EngineException - If a system error occurs.

getServer

java.lang.String getServer()
Returns the host name of the email server.

Returns:
The host name of the email 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.

getUsername

java.lang.String getUsername()
Returns the username to access the mail server.

Returns:
The username to access the mail server.

setDeleteProcessedMessage

void setDeleteProcessedMessage(boolean deleteProcessedMessage)
Sets whether a processed email is automatically deleted after control returns to the mail trigger. Note that when using the POP3 protocol, the JavaMail implementation does not appear to allow messages to be deleted.

Parameters:
deleteProcessedMessage - Whether a processed email is automatically deleted after control returns to the mail trigger.

setImapFolder

void setImapFolder(java.lang.String imapFolder)
Sets the name of the IMAP folder that is checked for email messages.

Parameters:
imapFolder - The name of the IMAP folder that is checked for email messages.

setImapFolderCopyDestination

void setImapFolderCopyDestination(java.lang.String imapFolderCopyDestination)
Sets the name of an IMAP folder, if any, to which a processed email is copied when the mail trigger fires.

Parameters:
imapFolderCopyDestination - The name of an IMAP folder, if any, to which a processed email is copied when the mail trigger fires. May return null.

setPassword

void setPassword(java.lang.String password)
Sets the password to access the mail server.

Parameters:
password - The password to access the mail server.

setPollingDelay

void setPollingDelay(java.lang.String timeExpression)
Sets a time expression that specifies how long the mail trigger waits to poll the mail server for new email messages.

Parameters:
timeExpression - A time expression that specifies how long the mail trigger waits to poll the mail server for new email messages.

setPort

void setPort(int port)
Sets the mail server port.

Parameters:
port - The mail server port.

setProtocol

void setProtocol(MailProtocol mailProtocol)
Sets the mail protocol used to communicate with the mail server.

Parameters:
mailProtocol - The mail protocol used to communicate with the mail server.

setServer

void setServer(java.lang.String server)
Sets the host name of the email server.

Parameters:
server - The host name of the email server.

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.

setUsername

void setUsername(java.lang.String username)
Sets the username to access the mail server.

Parameters:
username - The username to access the mail server.


© 2014 Flux Corporation. All rights reserved.