E-Mail Processing Task Properties
The E-Mail Processing Task Properties window contains the settings for a job step that executes an E-Mail Processing Task.
Property Pages
General
Name for this step (optional)
Optionally, specify a descriptive name for the step.
Enable this step
Uncheck this box to disable the step. If the step is not enabled, it will be skipped at execution.
Description/Notes
Enter any extended descriptive information or notes for this step.
Conditions
The Conditions page defines conditions that must be satisfied before the step is run.
Condition Criteria
The Condition Criteria determine how the conditions should be evaluated:
- Execute only if all conditions are met. The step is only executed if all of the listed conditions are met.
- Execute if any condition is met. The step is executed if any of the listed conditions is met.
If Conditions are not satisfied
The satisfaction options determine what adTempus should do if the conditions are not satisfied:
- Fail the step. The step is not executed; the status is set to Failed.
- Execute anyway. The step is executed anyway.
- Skip the step (do not report as a failure). The step is not run, but it is not treated as a failure. The status of the step is reported as "Skipped (conditions not met)."
Conditions List
The Conditions list lists the conditions that have been defined for the step. You can add, edit, or delete conditions. See the Conditions topic for information on the available condition types.
Variables
The Variables page allows you to define Job Variables for this step. You can add new Variables, or override the values of Variables inherited from the Job. Any Variables you define or override here affect only this step of the Job.
To set Variables that apply to the entire job, use the Variables page in the Job properties.
Responses
The Responses page defines the actions that adTempus should take in response to events that are fired during execution of the step. You can add, edit, delete, or reorder responses.
All job steps support the events listed below. Some tasks may define additional events .
Event | Description |
Step Started | Occurs at the beginning of the step. |
Step Ended | Occurs at the end of the step, regardless of the step result. |
Step Failed | Occurs if the step fails for any reason. |
Step Restarted | Occurs if the step is restarted due to a Response. |
Restart Limit Exceeded | Occurs if the restart limit is exceeded. |
Step skipped | Occurs when the step is skipped, either because conditions were not met (if the Skip... option is selected on the Conditions page) or due to a skip option specific to the task. |
One or more conditions failed | Occurs if one or more Conditions for the step is not satisfied. |
Conditions not met within the specified time |
Occurs if the job or a step within the job has been waiting for conditions for longer than the specified time. |
In addition to the standard response events, this task defines the following events:
Event | Description |
No messages selected | Occurs if no messages matched the selection criteria. |
One or more messages selected | Occurs if at least one message matches the selection crtieria. |
Selected message count matches a value | Occurs if the number of selected messages meets the specified criterion. |
Message Source
Mail connection to use
Select an existing Incoming E-Mail Provider or create a new one. The e-mail provider represents a connection to a POP3 or IMAP mail server using a single login account.
IMAP Folder
For an IMAP connection you may optionally enter the name of the folder to select messages from. Leave blank to select from the default Inbox folder for the account.
Delete selected messages
If this option is checked, adTempus will delete from the mail server each message that is selected and processed by the e-mail processing operation. Messages that do not meet the selection criteria are not deleted.
If this option is not checked, adTempus will leave the messages on the server. However, adTempus remembers which messages it has already seen and will not reprocess the messages again in the future unless you clear the message list as described in the next section.
Some mail servers (such as Gmail) may not delete messages even if adTempus tells them to.
Clear list of previously-processed messages
Click this button to clear the list of messages that adTempus has already examined in this mailbox. This will cause adTempus to examine all messages in the mailbox the next time it connects to the server. Use this option if, for example, you have changed the message filtering rules and want adTempus to re-examine messages to select messages that were not processed in the past because they did not meet the selection rules.
Message Selection
This page allows you to define criteria controlling which messages adTempus will select for processing. If no criteria are defined, adTempus will select all new messages in the mailbox.
adTempus remembers which messages it has already seen, and will never re-read messages it has already seen, unless you clear its list using the Clear list of previously-processed messages button.
Selection Rules
If no rules are defined, adTempus will select all messages in the mailbox. To filter messages based on criteria based on their subject, content, sender, attachments, etc., add one or more selection filters.
If you add more than one rule, specify whether adTempus should select messages that match Any rule or only messages that match All rules.
Selection Script
For more advanced filtering, you can use a .NET script to filter the message. For each message that meets the basic selection criteria (if any), adTempus will run your script. Your script has access to the Parameters.Message object, which exposes the message and its attachments through a MailMessage object.
Your script must return True if adTempus should select the message or False if it should not.
Message Saving
The options on the Message Saving page allow you to save selected messages and/or their attachments to disk.
Save format
Select the format to save the message in:
- RFC 822. The message is saved in standard RFC 822 format with file name message.eml. Any attachments are included in the file as embedded MIME sections.
- RFC 822 with attachments. The message is saved in standard RFC 822 format with file name message.eml, and attachments are also saved in separate files.
- HTML with attachments. The body of the message is saved to an HTML file named message.htm. Attachments are saved in separate files.
- Text with attachments. The body of the message is saved to a text file named message.txt. Attachments are saved in separate files.
- Attachments only. The body of the message is not saved, but all attachments are saved in separate files.
Save messages to folder
Specify the base folder where messages should be saved. adTempus will create a uniquely-named folder under this folder for each message. The folder will contain a file for the message body (named as specified above based on the Save format) and/or the attachments for the message.
adTempus will store a list of the folders that it creates in the EMailProcessing.MessageLocation Job Variable.
For example, you set the save location to c:\messagedownload. adTempus processes 2 messages and saves them in format HTML with attachments. The variable will be set to:
c:\messagedownload\{C7C9286D-607F-4192-9960-EDED8624A4BE};c:\messagedownload\{837FC8D4-314D-41E3-B95E-412CB84694E5}
The messages can be found in files c:\messagedownload\{C7C9286D-607F-4192-9960-EDED8624A4BE}\message.htm and c:\messagedownload\{837FC8D4-314D-41E3-B95E-412CB84694E5}.htm.
The attachments for each message can be found in the corresponding folders.
Job Variables
This task creates the following Job Variables, which are available for the remainder of the job:
Name | Description |
EmailProcessing.MessageLocation | A semicolon-delimited list of the files or directories created if messages or attachments were saved. See the Message Saving section for more information. |
EmailProcessing.SelectedMessageCount | The number of messages selected by the task (the number of messages that meet the selection criteria). |
Related Concepts