Not able to store body of mail

Hi all,

I’m not able to store the content of the body with item.body.tostring.
However, I can store the subject and the header.
I’ve come across many topics with this problem, but no solutions.
Anyone knows?


Which type of mail message you are using, system.Net or system.Web?

I am using get outlook mail messages and I am using as typeargument in the for each.

attach your workflow file

Is it possible to share screen shot of your for each ?

@yannip I am just curious, do you have more images on your outlook email data…

What do you mean exactly?

mail test.xaml (9.3 KB)

Here is my workflow. In the for each, I have tried with both ‘mail’ and ‘item’.

@yannip, if your email body contain only image data then it won’t give output values… by using item.body.tostring.

Okay, but no, it is text.

You missed this at output. Your script is working perfectly fine. just add output.

(Note: if you feel i resolved your issue, please mark as resolved.)

1 Like

Hi @rkelchuri,

I edited the attached workflow, you downloaded it too early. I uploaded the wrong version.
I have the output there but it is not working :(.

mail_test.xaml (14.4 KB)

ok then run this… it is working perfectly fine in my system.
also make sure you have unread emails in your out look and your out look is open in your system.


@rkelchuri: I’m not able to run it.

your workflow works perfectly for me. i can see the subject, header and body of my emails in Output.

Problem could be with your email body. Try writing the body to a text file

Please add for each loop and change typeArgument as System.Net.Mail.MailMessage.
You will be in good shape.

Hi @dineshary,

the issue remains. My output text file is empty.

Hi @rkelchuri,

still the same issue. This is the unread email I am using in my outlook.

What is your outlook version ? 2016 or 2018 … please advise.