Unable to get the mail body with get outlook mail activity

I can read the subject of the mail but i cant read the body of the mail. I am getting a blank body I am attaching screen shot I am unable solve the issues I tried everything for the link below.

1 Like

Welcome to uipath community
Well as you have mentioned along the sequence they must be HTML body I hope…
So kindly try with HTML body syntax in assign activity where the break point is placed
—remove that break point and try once

Kindly try this and let know for any queries or clarification
Cheers @Raki

1 Like

Hi @Palaniyappan Thank You for help

I did use the html body mail.Headers(“HTMLBody”) but it still gives me blank body.

I also want to mention that the laptop I am using is US govt, we are running the community edition on it and the mail that we are trying to read is sent by US govt office.

@Raki - Some clarification. None of the things you are trying display the body? i.e. body1 variable is blank, MessagBox displays blank. File Untitled.txt is blank?

If so - is the email blank? I can’t seem to replicate the error. Is the “If condition” being satisfied?


I wonder do the mail with subject having the string “abcd” has any body content in it or kindly check that once


even we need to check whether the onlyunreadmessage property in the get outlook mail activity is enabled or not…along with markasread property as well
–if both are enabled then we need to have atleast one mail unread, i hope that wont be an issue here if we are able to validate the subject, but still we need to check that once


Have we used any filter condtion in the filter property of get outlook mail activity
if so we need to check that as well

Hope this would help you
kindly correct me if i m wrong and try once and let know for any queries or clarification

Cheers @Raki

1 Like

I am attaching the xaml file Please let me if it is working properly or what is wrong with it

GetMail1.xaml (9.0 KB)


@Raki - I think you attached the wrong xml file - there is no “Get Outlook Mail Message” activity in there that I could find.

@Raki - This worked perfectly on my computer. There must be some issue not related to the coding. You say you can read the subject, so you are getting the mail items, but not the body.

I sent myself a blank email, and when I looked at untitled.txt it was blank. Is the last email you’re reading in a blank email? I sent myself 2 emails, first one that is blank, then one that was not. It found them both, but read the blank one second, so, Untitiled.txt was empty (even though the pop up message contained a couple of HTML codes, the value of the .Body property was empty for this email.

I deleted the blank email, and ran it again and Untitled.txt contained the body of the email.

Try validating your troubleshooting procedures - it may be something as simple as a blank email - or a too big one. I sent a very large email, and there was no pop-ip for the HTML as it was (I guess) too big or maybe there just was’t an HTML body. But that made it seem as if there was no body (even though when I checked Untitled.txt the body was there and abcd1.eml wad information too.

I am having the same issue, with Studio Enterprise 2020.2.0.
When I get IMAP Mail messages, I am seeing this:

And I am sure that there is a body in the mail, I tried item.Headers(“HTMLBody”) but it’s not fetching me what I want (the body of the mail is a simple plain text).
Best regards

Hi, did you ever find a solution to this?

No, I ended up using Outlook :confused:

Same Issue any anwsers?

Hi Palaniyappan, I am new to community. I have the same issue is there any workaround where we can get the body.