Gmail/Outlook IMAP returns blank message.body(Sample not working)

Hi, I am running the bot as per the below link. However I get a blank message displayed. I am trying just a few lines in the Email, but still I get blank in the output.

I can display and see “mailMessage.Subject”
but cannot view “mailMessage.Body” what ever I do.

Can some one please help?

Thank you

3 Likes

Just trying to give a bump as its been 12hrs.
I am actually just trying the as-is example, but I still do not get the body to show up.

Please let me know if I am not looking at the right place, or some other resource that has worked for you.

just an update, I have tried the same with Outlook.com IMAP settings as well. Can display and see the Subject line, but unable to read the body.

If IMAP is not the way, what other options do I have to read a mail body?

@saikumar1 did you use for each with an If inside to read the subjects or body ?
Also send a screenshot of your imap Properties pane

Regards
Vicky Das

Do like my post if it helped you :wink:

Thank you for your reply Vicky. Yes,I had both subject and body displayed separately, dint work. In fact the example on the portal itself is for body- doesnt work. :slight_smile:

well, ok! cracked it at last

The sample works only for plain-text mail messages. So, if it were HTML messages this stays blank.

The genius of an answer is here

Although its a typo there, the correct assignment is to be
mail.Headers("HTMLBody").ToString

Hope this helps someone who has been having sleepless nights.

17 Likes

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