Unable to get the mail body in outlook

outlook

#1

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

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


#3


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.


#4

Hi Can you please check that issue

Error Image attached Issue


#5

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


Cant access the body of the mail
#6

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


#7

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