How to use the Message Filter Criteria to retrieve specific emails in the Mail Operators.

Document ID : KB000020101
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Details on how to use the Message Filter Criteria for email retrieval operators Get Email List, Get Email Count, Get Email Envelope, and Get Email Content.

Solution:

General Email Filter:

These filters work regardless of the Mail Server type.

Message ID: Returns the email(s) with the specified ID.

Message Number: Returns email(s) with the specified number.

Message Subject: Returns email(s) with the specified value in the Subject.
For example if you enter "Sales" - it will return all email with Sales in the subject line such as "Upcoming Sales meeting" "3rd Quarter Sales Projections" and "Weekend Sales at Golf Warehouse"

Message Sender: Returns email(s) from the specified Sender.

Message Body: Returns email(s) with the specified sting in the email body. It will return all email that contain the string in the same way as the Message Subject above.

Earliest Message Sent Time
and
Latest Message Sent Time

Returns email(s) within the specified time frame. Can be used independently to get all email since a particular date, before a particular date, or between the dates specified.

Earliest Message Sent Time and Latest Message Sent Time fields are CA Process Automation date type variables. System functions like now() or today() generate date type variables. A system function named parseDate (stringDate, simpleDateFormat) creates the date properly. stringDate is the date in string format and simpleDateFormat is the format to use to parse the date. This function can be used to parse a string to a CA Process Automation date type variable.

For example:

parseDate("2010/07/28 13:00:01", "yyyy/MM/dd HH:mm:ss")

IMAP Specific Filter Criteria:
These two settings are specific to IMAP mail servers

IMAP Message Flag: Returns emails with, or without the specified flag.
IMAP Message Flag is set to true: Used to reverse the emails that the IMAP Message Flag returns.

"IMAP Message Flag" is used in conjunction with the "IMAP Message Flag is set to True" check box.

With the "IMAP Message Flag is set to True" box checked, the "IMAP Message Flag" filters the messages with the Filter selected from the Drop down.
With "IMAP Message Flag is set to True" box unchecked the filter is reversed.

For example:

To filter all SEEN messages, select SEEN as the flag in the drop down, then check "IMAP Message Flag is set to True".
To filter all UNSEEN messages, select SEEN as the flag, and leave "IMAP Message Flag is set to True" unchecked.

To filter all ANSWERED (replied too) messages, select ANSWERED as the flag in the drop down, then check "IMAP Message Flag is set to True".
To filter all UNANSWERED (not replied too) messages, select ANSWERED as the flag, and leave "IMAP Message Flag is set to True" unchecked.