Introduction into Advanced Email Parser.
0 / 7
Table of Contents

Introduction

This course teaches users how to work with Advanced Email Parser and helps to choose an appropriate model of the AEP behaviour for email processing rules.

We will consider the following topics:

Main principles of work with Advanced Email Parser

Advanced Email Parser is used to solve routine tasks which require reaction at datasets. It can work with the following raw data: email, a text file, the current date, data retrieved from an application, etc. But receiving of the email is always the initial step for the data analysis.

MS Outlook and MS Exchange! also have data filters, but what differs them from Advanced Email Parser?

The main difference is that Advanced Email Parser runtime operation can include a parameter which entailed this operation or a parameter received from the outside. Then this runtime operation can entail the next operation based on these parameters.

A typical situation:

As you see this scheme completely depends on some data, which is unknown before you get the email. You cannot create a filter in MS Outlook or MS Exchange. Moreover besides the ordinary sorting you also need to do some operations which cannot be performed by MS Outlook/MS Exchange.

So the main AEP principle is:

As we have already mentioned, receiving of the email is always the initial step for the data analysis.

Advanced Email Parser has three types of email receiving, and each of them is optimized for specific tasks.

Collector mode

In the Collector mode Advanced Email Parser independently checks mailboxes using predefined passwords.

Any mailbox with scheduled check options works in the collector mode.

This mode is used to:

It's recommended to use the Collector mode for the following tasks:

Broker mode

The broker mode is intended for email processing upon the email client request.

The scheme shows that the email client generates the request to the mailbox. Use this method to create individual processing rules for the incoming mail, when you do not need to watch the mailbox constantly.

The received email can be modified by the AEP rules and given to the email client which has generated the request.

Broker mode does not require the mailbox account in Advanced Email Parser and works in POP3/IMAP Proxy, sending the password/login to the requested POP3/IMAP server.

It's recommended to use the Broker mode for the following tasks:

How to set the Broker Mode:

To use Advanced Email Parser in the Broker Mode you should set this option in Advanced Email Parser settings and change the POP3 server settings to the 'Listen on address' field value in the email client (e.g. MS Outlook).

In the field "login" use the symbol @ and set the initial POP3 server which will be used for mail delivery in the email client settings.

Settings for MS Outlook:

Direct work with a POP3 server:

POP3 Server: pop3.domain.com
Login: user
Password: passphrase

Work with the same POP3 server using Advanced Email Parser in the Broker Mode::

POP3 Server: 192.168.1.1
Login: user@pop3.domain.com
Password: passphrase

SMTP Server mode

The SMTP server mode can be used to process emails received by the SMTP protocol.

Working in this mode Advanced Email Parser emulates SMTP server work. The received email will be processed according to the rules, but won't be saved at the server for further delivery. This mode is mainly used to create control schemes and manage mailing lists.

It's recommended to use the SMTP Server mode for the following tasks:

You can activate the SMTP Server mode from the menu settings:

Change the SMTP server settings to the 'listen on address' field value in the email client.

Execution order of email processing rules

At first when choosing an appropriate processing rule Advanced Email Parser checks whether the email corresponds to the rule filter. If the incoming email conforms to the filter, this rule will be used for its processing. Otherwise AEP will check the next rule.

If the rule lacks filters, it will process ALL incoming/outcoming email.

The searching order of email processing rules corresponds to the rule order in the rule constructor.

Advanced Email Parser will check the email against filters in Rule 1, then Rule 2, etc, until the executable rule is found.

This is Important!



If the filter corresponds to the processed email and this rule has no Continue With Next Rule flag, AEP will stop searching for the next rule regardless the previous rule results.

If the email can be processed by more than one rule, you should set the Continue With Next Rule flag on.

Execution priority of email processing rules

Advanced Email Parser has two different models of rule execution. You should consider them if you use more than one rule for email processing.

Pending execution (Default)

In this mode Advanced Email Parser does not wait for the rule execution ending in the whole operating cycle, but puts this rule on a waiting execution list.

You cannot use the Message Actor component in the Pending execution mode, because it requires real-time access to the mailbox.

Use this mode to execute long-term rules (e.g. with HTTP queries) to avoid disconnection from the mailbox by timeout.

Immediate Execution (RealTime Processing enabled)

In this mode Advanced Email Parser waits for execution ending of the rule with the RealTime flag before processing the email by the next rule.

Use this mode for short-term rules and in the Broker Mode.

Execution priority in mixed modes

When using mixed methods of rule execution, at first Advanced Email Parser executes rules with the RealTime flag, according to their order in the constructor. Then it executes rules without the flag.

So the probable rule execution order in the demonstrated example will be:

How to choose an appropriate AEP behaviour model

Designing the scheme of AEP rules you should consider the following parameters:

Answer these questions and thus make an appropriate choice among Collector, Broker and SMTP Server modes.

Example 1.

Task: The technical support service uses email communication. On getting the email from the client you need to add information about the client's latest order to this email.

Choice of the solution:

The most appropriate solution for this task is the Broker Mode, because it can transfer the modified email to the email client and doesn't do regular mailbox polling.

Example 2.

Task: You need to trace such client's email delivery errors as "the mailbox has not been found" or "the mailbox is overflown", and then to execute some operations (e.g. to add this email to the opt-out list).

Choice of the solution:

The most appropriate solution for this task is the Collector mode, as it regularly interrogates the POP3 mailbox and email delivery error messages do not require human assistance.