cancel
Showing results for 
Search instead for 
Did you mean: 

Read Outlook Email Body

MohanV
Staff
Staff
Dear Experts,

I am trying to read Outlook Email and insert insert into DB table, I am able to load all other fields except Email Body as it's reading as HTML. I tried to use below Regex to handle the issue but no luck.

Output = Regex.Replace(Body, "<[a-zA-Z/].*?> (Text)", String.Empty);

Appreciate if any  advise for any other way handle this issue so that I can get only text portion of Email body.

Note: I am already using the latest VBO for Outl0ok.

Best
Mohan
1 BEST ANSWER

Helpful Answers

Soumya21
Level 6
Hi @MohanV

You can take email body in text also by modifying code 
In VBO change the one line of code in internal get items action
in that replace this one line of code row("Body") = If(item.BodyFormat = 2, item.HTMLBody, item.Body) with this row("Body") = item.Body
It will fetch you email body in text.

Thanks,
Soumya​​

View answer in original post

2 REPLIES 2

Soumya21
Level 6
Hi @MohanV

You can take email body in text also by modifying code 
In VBO change the one line of code in internal get items action
in that replace this one line of code row("Body") = If(item.BodyFormat = 2, item.HTMLBody, item.Body) with this row("Body") = item.Body
It will fetch you email body in text.

Thanks,
Soumya​​

MohanV
Staff
Staff
Worked like a Charm. Thank you Soumya kalal.