Mail Scanner Nodes

From PresenceWiki
Revision as of 08:38, 15 January 2010 by Mattpryor (Talk | contribs)

Jump to: navigation, search

Mail Scanner

The Mail Scanner Node can connect to POP mail accounts and retrieve emails, and then convert them into a Presence Data Table. This is especially useful for creating automated processes based on emails you receive.

The POP Scanner Interface

To create a new POP scanner in your Task, either drag Task Element labelled "Scan Mail Accounts" from the Data Access toolbox, or right-click on your Task and choose "Insert New > Mail Scanner > Scan Mail Accounts" from the pop-up menu.

POP Scanners created are not reusable. This means that while you can copy and paste a POP Scanner from one Task into another (or the same Task), changes made to one will not affect the other.

This is a view of the POP Scanner interface which will be displayed:

The Name and Description fields allow you to enter a descriptive name and short description of this item.

Account Details

This is the POP Mail Account Resource that you wish to connect to, which stores details such as the IMAP folder, Account Name, Password, Server Host, Port and security options. These can all be overridden by checking the "Override Values" checkbox.

Test Tab

If you want to run a test to check that your settings are correct and you can connect to your mail server, click on the "Test" tab, then click the "Test" button:

Timeout Options

This allows you to specify that the mail scanner should time out after a period of time if the mailbox is locked, or if it is unable to connect.

In addition you can specify the amount of time to wait before releasing the mail account lock.

Failed To Connect Options

When a timeout occurs, the Task can either raise an exception (which will be caught by an Error Handler Node if one is present) or it can continue anyway. Select the option here that best suits your Task.


Message Removal Options

This allows you to control how and when messages are permanently deleted from the mail server. The default option is to never delete messages either when retrieving them via the Mail Scanner editor or from within a Presence Task.

Alternatively you can select to delete them regardless of whether they pass the scan criteria (see below), or only if they do. This option is available separately for the mail scanner interface tests and for within Tasks.

Limit Emails

This allows you to limit the number of emails that are retrieved by this Node. You can limit the number of emails that get considered (before filtering options are taken into account) and the number of emails that get processed.

Scan Criteria

These options allow you to filter the messages that are retrieved based on selected criteria. You can filter messages based on the contents of the message header, body, and parts (e.g. attachments). For instance, you may only be interested in messages that are sent to a particular email address, or have a particular subject.

To apply criteria to the Header, Body or Parts, click the relevant tab. In the case of the Header and Parts, you will be presented with a drop-down list displaying the available parameters which can be filtered, for instance in the Header you can filter according to the value of the Message ID, Subject, Return Path, Status, etc.

The "Populate" button will cause the combo boxes to be automatically populated according to the contents of emails on the server.

Message Headers make up the information fields of the message and include (but are not limited to) Subject, Sender, Recipient, Return Path, unique Message ID and so on. Note that different e-mail packages may include different Headers. The bare minimum requirement for all e-mails (according to the RFC-822 internet standard) is to include Sender (FROM), Recipient (TO/BCC) and the Date of the message.

The Unique Message ID also should be present and this is added at the receiving mail server (not by the sending mail server). Other headers are optional and may or may not be present. Be aware of this before filtering on headers.

The Message Body is the text content of the e-mail. Although a single e-mail can include multiple body fields - for example, one for plain text, one for HTML formatted, the actual text content will usually remain the same. Presence allows you to treat these as separate items - searching either the plain text version or the HTML codes.

Message Parts are the separate components of a multipart MIME format message. In actual fact the message body fields are considered to be parts also, but for convenience Presence treats these as a separate component. Other Parts include attached documents, embedded images, and any other binary files.

Message "Read Once" Options

This option allows you to flag messages as Read in an internal Presence database to prevent the same message from being retrieved twice on subsequent executions.

To reset this list so that older messages can be re-reader, click the "Clear Out Deleted Messages" button.


The Output Panel gives the user the ability to select which values to include in the outputted Data Table. To include a value, drag the item from the list on the left hand pane into the main (centre) pane. These are the options available: