The methods in the Email connector retrieve, send, and reply to email messages, and can download attachments. Use the SetConfig method first to set up the connection to your mail server.

Use the SetConfig method to configure the mail server properties and access credentials. This method must precede all the other Email connector methods in the automation.

The GetMails method retrieves messages from the mail server and passes them to other methods as an object that contains one or more messages. The ReadMail, ReplyMail, and SaveAllAttachments methods operate on a single message at a time. When these methods receive an object that contains more than one message, the automation must use a For Each or For Loop method to iterate each message in the collection.

SetConfig

Sets up the connection to the mail server so that the automation can work with messages.
Note: You must run this method before running any other methods in the Email connector.

For information about how to set the parameters, see Configure port properties.

GetMails

Returns messages from the mail server for use by other methods. You can set the method to retrieve either read (seen) or unread (unseen) messages and specify the folder that they're gathered.

For information about how to set the parameters, see Configure port properties.

Table 2. GetMails method parameters
Parameter Description Data port type Data type Default value Required? Notes
FolderName Name of the IMAP folder that the method fetches the collection (for example, Inbox) Data in String Inbox Yes To specify a nested IMAP folder, enter the folder hierarchy by using backslashes (for example, Project\Meetings)
Filter Set to get only unread (Unseen) or read (Seen) messages Data in FilterMode Unseen Yes
Return Returns the mail collection as an object Data out Object Object Yes

MarkAsRead

Marks messages from a specified folder as read.

For information about how to set the parameters, see Configure port properties.

Table 3. MarkAsRead method parameters
Parameter Description Port type Data type Default value Required? Notes
MailObject The email object based on which the corresponding message is marked as read Data in Object Object Yes
FolderName Name of the IMAP folder that the email object is fetched Data in String Inbox Yes To specify a nested IMAP folder, enter the folder hierarchy by using backslashes (for example, Project\Meetings)

MarkAsUnread

Marks messages from a specified folder as unread.

For information about how to set the parameters, see Configure port properties.

Table 4. MarkAsRead method parameters
Parameter Description Port type Data type Default value Required? Notes
MailObject The email object based on the corresponding email that is marked as unread. Data in Object Object Yes
FolderName Name of the IMAP folder that the email object is fetched. Data in String Inbox Yes To specify a nested IMAP folder, enter the folder hierarchy by using backslashes (for example, Project\Meetings)

ReadMail

Reads a message and returns its details, including subject, body, sender (from), recipients in the CC field, recipients in the BCC field, and the number of attachments.

For information about how to set the parameters, see Configure port properties.

ReplyMail

Automatically replies to a message. Use the parameters to set the body of the message and other details. You can include attachments.

For information about how to set the parameters, see Configure port properties.

SaveAllAttachments

Saves all attachments from a message to the local drive.

For information about how to set the parameters, see Configure port properties.

Table 7. SaveAllAttachments method parameters
Parameter Description Data port type Data type Default value Required?
MailObject Message that the method downloads the attachments from Data In Object Object Yes
FolderPath Path of the directory to which the attachments are downloaded Data In String None Yes

SendMail

Sends a message. Use the parameters to set the body of the message and other details. You can include attachments.
Note: Use the SetConfig method to set the From address.

For information about how to set the parameters, see Configure port properties.