I have fixed my issue.
The problem was that UiPath excepts HTML body like the below code.
"<div class=\“zd-comment" dir="auto">Hello Trisha,
I went to check Mike’s reporting role assignment and could no…”
There is a “\” after div class but I was providing the HTML body like
**
“<div class="zd-comment" dir="auto">Hello Trisha,
I went to check Mike’s reporting role assignment and could no…”
**
without any “\”.
So what I have done is I have removed all the Environment.Newline using Regex (Remove line breaks in string - #2 by PrankurJoshi) and added “\” in the HTML body by doing String.Replace(“”“”, “\”“”).
Note: The “\” was there before all the " so it was easier to ad ""