Handle .msg emails


Do you know any smart way to handle .msg emails ? I have to get the body of the downloaded file, updated it, delete and add some data before replying to all messages and send it.

Please, does someone have a solution for this issue, i looked on the forum for hours with no result.

Thank you in advance !

1 Like

Hey @maroua301,

Do you have .msg mail files stored in folder.

You want to extract body from that and send a new mail / you want to reply to that mail.

Thanks :slight_smile:

Hey @Nithinkrishna,

Yes, the .msg is stored in a folder, the problem i have is that i have to copy the body from that mail, than add a new line inside, also keep the logo and font the police, than send it to someone else. Which is complicated.


1 Like

Hi @maroua301

To retrive body from each mail which u are iterating

U can use mail.Headers(“PlainText”) which will help to retrieve the mail and add a new line to it and along with attaching ur information

Then if u want too add logo or some image

Then u can read the below logiic to get the idea

  1. For attaching logos in mail.bodies u have to make ur mail.body as HTML

  2. So write in HTML format with proper tags so that it includes body and image itself in notepad using Uipath

  3. Then attach the body data to the body property panel of mail message activitiy with Body As HTML ticked

Hope it helps you


Nived N :robot:

Happy Automation :slight_smile::slight_smile::slight_smile:

1 Like

@maroua301, The First step is to retrieve .msg file content and convert it into a mail object. The below component may help.

Then follow the steps prescribed by @NIVED_NAMBIAR

Thanks :slight_smile:



Thank you, but your component, use a .eml file not .msg


As what you are describing, i would suggest, that you just copy the body of that email, past it in a word document, do the necessary steps needed, copy past back to the email.

This should clear out your issue !

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.