Unable to get the mail body in outlook

I am using win 10 and i am not able to get the email body in outlook. Previously I was able to get it when i was using win 7.
I am using “get outlook mail message activity” to get my mails, using for each loop to get each mail one by one.

2 Likes

Hi @devbrath

Welcome to the Community !

What is the error you are facing and if possible can you please share the workflow or the snapshot of the mail activity ?

Regards

Rajat


it is a simple workflow to get the mail contents from outlook. Nothing much complicated, but the same workflow works in win 7. “Get outlook mail messages” checks for only unread mail messages. “Get subject” msg box returns the subject of the mails but the “Get mail body” returns nothing. Its an empty msg box.

Hi Can you please check that issue

Error Image attached Issue

Hi there @devbrath,
Is it possible the mail item you are trying to write actually has no body and thus, is null?

Before you write it, can you add the following:
If String.IsNullOrWhiteSapce(mail.Body) = False Then
WriteLine - mail.Body
Else
WriteLine - “Mail Body (mailBody) Is Null Or WhiteSpace”

See what the result is.

Thanks,
Josh

Hi @Mr_JDavey
I have tried both the method but the problem is still there. It’s not able to read the mail body.read Mails.xaml (7.1 KB)

Regards
Devbrath

Hi there @devbrath,
The solution you have provided should work.

I made some changes to format the output, which can be found below:
read Mails.xaml (7.7 KB)

The output of this can be seen here:

As I noted before, is it possible to Mail you are pulling actually has no body?

Thanks,
Josh

Hi i know this is an old thread but can you kindly share the solution if you found one as I am having the same problem of not being able to retreive email body when using win10 instead if win7.
Thanks