mailMessage.Header(“HTMLBody”).ToString does not working for Get Exchange Mail Messages

Hello Team,

I am facing issue while reading the email table from “Get Exchange Mail Messages” through “Extract data tables from HTML” activity. I got below exception:
Extract data tables from HTML: Object reference not set to an instance of an object.
Extract data tables from HTML activity working fine while using Get Outlook Mail Messages
Please help to resolve that issue to read table from Get Exchange Mail Messages

1 Like


Can you please debug and check once.

Also is this appearing for all mails ?


Hi @Nithinkrishna emphasized text

I also checked in debug mode. It is only happened while reading email from “ Get Exchange Mail Messages
But working fine with Get Outlook Mail Messages.

1 Like

Hello @ALAM_MD

Are youf acing the issue while reading the email itself or in the extract datatable activity?

Also can you plz print the value item.Headers(“HTMLBody”).ToString and check the value.


Kindly debug and show the mail object values from the debug panel ?


Hello @Rahul_Unnikrishnan ,

Email reading from “get exchanged mail message” working fine. Only issue while using item.Headers(“HTMLBody”).ToString

But item.Headers(“HTMLBody”).ToString working fine with outlook mail message.

You may download the version of Mail Package to try. The latest version doesn’t work properly sometimes. Don’t know the reason.

@ALAM_MD Kindly show us on the same.


Do you have the IsBodyHtml Property enabled in Get Exchange Mail Messages Activity ?

@supermanPunch ,