Getting empty email body from gmail


I am getting an problem in reading email from gmail. I am using Get IMAP Mail Message activity and reading unread emails. Now I want to read email body and want to enter data into our site. But I am getting email body as empty. The output showing as below.


I used below to get email body

Please help.

Please try item.Headers(“PlainText”) and see if this returns anything.

1 Like

Thank you.
It is resolved my problem.
Can you please let me know how can I get HTML contents from email body and read html table. I am getting emails which contains data in tabular form. I want to parse those data and put them on website.
Please let me know if it is possible.


See Get outlook mail messages html body
This will return the whole mail body in html and you will need to make some string operations to it.

I am not using outlook. I am getting email from gmail. I need to read html table. is it possible to find html element in a string.

Use mail.Headers(“HTMLBody”) , it doesn’t matter if you’re using outlook or something else.

Ok. Thank you.

Then can I read contents as html like find an element by tag name. if it is possible, please let me know how?

Then the returned body would look something like <div dir=\"ltr\">rarararara</div>\r\n in a string variable, for example.

firstly use mail.Headers(“HTMLBody”) and then convert that in mail.Headers(“plaintext”). it will be working

1 Like

Thanks , That Worked for me . But still I am receiving blank message box at start and end of execution

How do i make the conversion?