How To Retrieve E-mail Body/Subject/Sender Details – In UiPath

Emails are widely used in automation for the purpose of communication between users and robots.

Sometimes emails act as the input to a few processes!!!

Let us see how to retrieve mail’s Body, Subject and Sender details using UiPath activities.

Example

Implementation using UiPath :

Let us implement a workflow which will read the emails from Gmail server and retrieve the emails 🙂

Step 1:
Drag “Get IMAP Mail Messages” activity into the designer panel and supply the required parameters to it as shown below.
Retrieve Email Body,Subject and Sender details 1Retrieve Email Body,Subject and Sender details 2

Step 2:
Drag “For Each” activity into the designer panel and pass the above-created mail List to it.

And change the “TypeArgument” in the properties panel to
System.Net.Mail.MailMessage

Retrieve Email Body,Subject and Sender details 3Retrieve Email Body,Subject and Sender details 4

Step 3:
Drag “Message Box” activities into the designer panel to display the Sender details, Subject and Body of the received mail.

Retrieve Email Body,Subject and Sender details 5

Step 3:
Now, execute the project!!!

Mail Sender:
Retrieve Email Body,Subject and Sender details 6

Mail Subject:
Retrieve Email Body,Subject and Sender details 7

Mail Body:
Retrieve Email Body,Subject and Sender details 8

Click here to download the Source Code…

Hope it has helped you…

Leave a Reply

%d bloggers like this: