Using the For each mail in mail box iterator
You must use certain Email actions within a Loop action. Use the For each mail in mail box iterator to repeat a set of actions on all the emails within the specific parameters.
First, connect to the email server. Using the Connect action
- Change status
- Save attachments
- Save email
To use an Email action within a loop, follow these steps:
- Double-click or drag the Loop action from the Loop package in the Actions palette.
- Select the For each mail in mail box option from the Iterator list.
- In the Session name field, enter the name of the session that you used to connect to the email server in the Connect action.
In the ALL, READ, or
UNREAD options, specify the type of email to retrieve
from the email server.
Note: For an email server that uses the POP3 protocol, all emails are retrieved.
Specify the folder from which you want to retrieve the emails.
- Microsoft Outlook and Yahoo: You can specify the name of
For example, Inbox, Sent, Inbox/Sales, Inbox/IT and so on. The Sales and IT folders in this example are user-created folders and not available by default.
- To retrieve emails from the default folders, you must use
except for the Inbox folder.
For example, [Gmail]/Draft, [Gmail]/Important, [Gmail]/Trash, and so on.
- To retrieve emails from the folders you have created or the
Inbox folder, you must specify the
folder names as they are.
For example, if you have created folders called Bank and Sports in your Gmail, specify Bank and Sports without the [Gmail] prefix to retrieve emails from these folders.
- To retrieve emails from the default folders, you must use [Gmail]/FOLDER, except for the Inbox folder.
- Microsoft Outlook and Yahoo: You can specify the name of the folder.
- Optional: In the When subject contains field, specify a value to retrieve emails containing the value you specified in their subject.
- Optional: In the From specific senders field, specify the email addresses to retrieve the emails.
- Optional: In the When received date is on or after list, select an option to retrieve specific emails on or after a certain date.
In the When received date is on or before list, select
an option to retrieve specific emails on or before a certain date.
If you have specified values for Steps 6 through 9, the system retrieves only those emails that meet all the criteria. For example, if you specify Bank in Step 5, Statement in Step 6, and firstname.lastname@example.org in Step 7, the system retrieves emails from the Bank folder that contain Statement in the subject and were received from the email@example.com email address.
Choose one of the following options from Use local
- True: The email received date and time is displayed in the local time zone.
- False: The email received date and time is displayed in the UTC time zone.
- Variable: Enter a Boolean variable.
In the Assign the current value to variable list, select
or create a dictionary variable.
The dictionary variable stores the properties of each email. Using dictionary variable for email properties.
- Click Save.