user57
(Yu)
November 23, 2021, 4:50am
1
mail.Subject, mail.From.ToString로 메일 보낸 사람, 메일 제목 다 잘 표시가 되는데 mail.Body.ToString은 문자열 뿐만 아니라 메일 html태그까지 다 가져옵니다.
저는 html태그가 아니라 받은 내용만 얻어오고 싶은데 방법이 없나요?
Srini84
(Srinivas Kadamati)
November 23, 2021, 6:48am
2
@user57
Check below post for your reference
Hi @yaniketz ,
You are getting a blank mail body may be because it’s in html format, other than plain text.
If so, read the html mail body by mail.Headers("HTMLBody") and convert it to plain text using the regular expression, System.Text.RegularExpressions.Regex.Replace(mail.Headers("HTMLBody"),"(<.*?>)|({.*})","") or you can use the key mail.Headers("PlainText") .
Please have a look at the workflow. HTML_to_plaintext.xaml (7.1 KB)
Warm regards,
Nimin
Hope this may help you
Thanks
system
(system)
Closed
November 26, 2021, 6:49am
3
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.