Incoming message statistics

Incoming message statistics - an example of work with a database using Simple Database Access.

Example Description

This example shows how the processor Simple Database Access, used to exchange data with a table in defined database, works. This component allows definition of the data source, the table, the list of correspondence between fields of the table defined and the variables used to exchange data.

To load the example, import the rule list rules.txt from the Examples\Simple Database folder.

The example shows the way of solving the problem of keeping incoming message statistics. When a message is received, sender's name and address is stored in the STATISTICS table. Besides, the number of messages received, the first and the last message receipt dates are stored for each sender.

Microsoft Access database stats.mdb located in the Examples\Database folder is used as data source in this example.

Example Rule Description

Filtering

The example contains Subject Filter, which filters all the messages other then example debug messages.

Processing

Parsing and conversion of the message date with the Date Parser.

Parsing of the sender's name and address.

Adding an entry for a new sender or updating for registered sender is done by the same component Simple Database Access.

Debug Message

The example contains debug messages to show how the rule works.

Remarks

Compare the rule in this example with the rule in the example Incoming message statistics. Please note that now only one component is used, which makes the rule much simpler.

© 2017 Mediatwins s.r.o. All rights reserved.