How to read email attached in a outlook mail

Hi ,

I want to read body of attached email in an outlook mail.

Thanks

Hi @TUSHAR_DIWASE

Item.Body -> it will get the body content

Check out this video

@TUSHAR_DIWASE
In Get Outlook Messages activity then output should be list

Take for each loop configure type argument as
System.net.mail.mailmessage

Then item.body.tostring

Which you can get body of email

Hope this helps

Regards
Gokul

hI @TUSHAR_DIWASE

You can try like this

  • Get Outlook Message store in a variable “MailMessages”
  • For Each item in MailMessage and set the for each argument as MailMessage
    • Use message box and item.body will get you the body of the email
      image

Regards
Sudharsan


Thanks for the reply . Sorry for confusion i will reframe my problem @Gokul001 @Sudharsan_Ka ,
outlook mail(Mail delivery failure) contain attachment which is a mail(Testing).
I want to read body of testing email.

i used outlook activity filter by subject and also download the attached email. now how can i open the save email and read body

Hi @TUSHAR_DIWASE

To get only the mail subject contains Mail Delivery Failure is it correct

In the Get Outlook Mail activity

Properties

Filter = "[Subject] = 'Mail Delivery Failure'"

Output -> Store it as “MailMessages”

For each loop configure type argument as

System.net.mail.mailmessage

Then item.body.tostring

Regards
Gokul

“Mail Delivery Failure” Email contain attachment which is an email (Test Email).
I want to read body of attached Test email.

With the suggested approach , i can read body of “Mail Delivery Failure” email.

HI @TUSHAR_DIWASE

Can try like this

Regards
Sudharsan

I am not familiar with vb.
Approach i am using is , saving attachment as email in local folder(test.msg).
using start process , i am opening mail and then get text to read content.
But output of get text is empty.

Any other approach is also appreciated