Secure Email Input

The Secure Email Input task captures a POP3 or IMAP email message with SSL (2.0, 2.3 or 3.0) or TLS (1.0, 1.1 or 1.2) encryption.

Note that this plugin cannot be used on a Windows instance that uses a multi-byte language (e.g. Japanese, Chinese). The workaround is to either use a different Windows language or use the standard Email Input/Output plugins.

Input

Secure Email Input captures an email and its attachments from the selected inbox when it corresponds to the rules defined in the General tab.
It will process one email at a time (unless the process is self-replicating; see Process properties) and it will capture the emails as long as there is unread email in the selected inbox.

Processing

When using the IMAP protocol, filtering is done at the server level and only the first email matching the conditions is retrieved from the mail server, along with its attachments.

When using the POP3 protocol, filtering is done at the client level. The plugin loops through every single email located in the inbox, retrieves the email’s header and applies the conditional logic. The plugin stops that loop when a header corresponds to the conditions. Only at that point the email's body and attachments are retrieved, and the email that corresponds to the conditions is deleted from the mail server.

When using the POP3 method, the plug-in will run very slowly if the inbox contains a large number of emails. Always use IMAP when possible.

Emails retrieved using POP3 are deleted from the server; emails retrieved using IMAP can either be deleted or marked as read.

Output

Once the plugin is done processing, an XML file is created with the email’s details and location of the body and any attachments. The encoding of the XML file is Windows-1252.

The body and attachments are located in the job's Temp folder of Workflow. Within the same process, those files must be moved to another location, otherwise they will be deleted at the end of the process (as expected for all files in the Temp Workflow folder).
Retrieving and moving the body and attachment files may be done using an XML Splitter.

Example output file
<?xml version="1.0" encoding="windows-1252"?>
<Email>
<FromName>Peter Parker</FromName>
<FromEmail>parkerp@ca.objectiflune.com</FromEmail>
<Subject>Bill of Lading</Subject>
<DateTime>2018-03-29 15:52:54</DateTime>
<To>starkt@ca.objectiflune.com</To>
<CC></CC>
<BCC></BCC>
<Files>
<File>
<Type>Body</Type>
<Folder>C:\ProgramData\Objectif Lune\PlanetPress Workflow 8\PlanetPress Watch\Debug\0103W5GQXZR2F0A\</Folder>
<Filename>Body.html</Filename>
</File>
<File>
<Type>Attachment</Type>
<Folder>C:\ProgramData\Objectif Lune\PlanetPress Workflow 8\PlanetPress Watch\Debug\0103W5GQXZR2F0A\</Folder>
<Filename>Priorities.xlsx</Filename>
</File>
<File>
<Type>Attachment</Type>
<Folder>C:\ProgramData\Objectif Lune\PlanetPress Workflow 8\PlanetPress Watch\Debug\0103W5GQXZR2F0A\</Folder>
<Filename>Bill of Lading (BOL).pdf</Filename>
</File>
</Files>
</Email>

The most pertinent information is located at the top level, under <Email>.
The sub node <Files> contains all the files for the email.
For each file, the type (body or attachment), folder and filename is provided. A file of type Body is always present and contains the body of the email.

The <Folder> information is the same for all files and is repeated to facilitate the selection when using an XML Splitter.

If multiple attachments have the same name, they will be appended with a numeric suffix, for example: File.pdf, File (1).pdf, File (2).pdf.

Task properties

General Tab

Enter the condition(s) that must be met for an email to be captured.

  • First found (no conditions): If this option is selected, the first email that is found will be processed (for each iteration of the plugin). In any other case, all conditions must be met for the email to get processed.

  • “From/To/CC/Subject/Body” contains: Select one or more options and enter the search text. "Contains" means that the search text can be surrounded by other text; for example, when looking for “world” in the “Subject” field, an email with the subject “Hello world, my name is Peter” will be captured.
    These condition fields are variable property fields. You can use any combination of text, variables and data selections; see Variable task properties. The use of the characters ? and * as wildcards is not supported in these fields.
    Note that it is not possible to specify multiple values in any of the fields.

Login Tab

Specify the connection information and options.

  • Login:

    • Enter the address of the incoming mail server (POP3 or IMAP), the port (the default port is 993 for IMAP and 995 for POP), protocol (POP3 or IMAP), and encryption method (SSL 2.0, 2.3 or 3.0 or TLS 1.0, 1.1 or 1.2) used.
      The usual server name for an Office365 server is outlook.office365.com while the usual server name for GMail is imap.gmail.com. Note that these values may be different for some implementations or may change in the future.
      Note that emails retrieved using POP3 are always deleted from the server.
    • Enter the account credentials: the email account name on the mail server, and the password required to unlock the selected account.

      By default, GMail may not allow Workflow to access the account’s mail boxes unless that account specifically allows automated systems to access the inbox. Please refer to GMail documentation to learn how to do that (https://support.google.com/accounts/answer/6010255?hl=en).

  • Options:
    • Enter the name of the inbox to monitor. This is useful if the email account has defined rules to automatically store certain incoming messages in a specific mail box.
    • Select what to do when an email is processed: mark the retrieved item as read or delete the retrieved item from the mail server. Note that when using POP3, you cannot specify the inbox, and a retrieved email is always deleted from the mail server.
    • Use temporary filenames for attachments: Check this option to save each attachment in the Temp folder with a unique temporary filename (the system variable %u is used to generate a name). You will still be able to access the original attachment names when processing them.
      If the original filenames are used and multiple attachments have the same name, they will be appended with a numeric suffix, for example: File.pdf, File (1).pdf, File (2).pdf.
"Other" Tab
  • Job Information group
    • Information elements: Indicates what Job Info variables are automatically created by the input task.
    • Add lines before first data page: Using the arrows keys you can add any job information directly at the beginning of your data file.
  • Backup input files: Check this to save a copy of each data file that is captured by your input. These files are saved in the PlanetPress Workflow Tools working folders under the "Backup" folder.
    To navigate quickly to the Workflow working folders, press the keyboard shortcut CTRL+ALT+Shift+F4 from within the Workflow configuration tool.
    The number of days to keep backups of jobs processed by input tasks is set per process; see Process properties.
  • Backup filename: Enter the file name that you wish the input data file backup to be saved under.
  • Delete Existing Metadata: Check to remove any Metadata from memory. This option is disabled on initial input tasks, and is checked by default on secondary input tasks.

On Error Tab

For a description of the options on the On Error tab see Using the On Error tab.

Miscellaneous Tab

The Miscellaneous tab is common to all tasks.

It contains a text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button and are displayed in The Task Comments Pane.

Check the option Use as step description to display the text next to the icon of the plugin in the Process area.

The tab also provides an option to highlight the task in The Process area with the default color, set in the Preferences (see Colors), or the color selected or defined under Highlight color on this tab.
To revert the selected highlight color to the default color, open this tab, turn the Highlight option off and close the dialog with the OK button; then turn highlighting back on.
Highlighting can also be turned on and off via the task's contextual menu and with the Highlight button on the View ribbon.