Currently I’m trying to send out and email which reads in an external json file.
The problem I’m having is when I want to send the email with “IsBodyHtml” being checked,
I lose all the nice formatting from the json file.
To inject the json, I read a text file, deserialize the json text file string into a jObject, Then I assign a string to = JsonConvert.SerializeObject(jObject, Newtonsoft.Json.Formatting.Indented)
To format the json again. This puts it in a nice format when i send without using HTMl in the body of the email.
So any help on how to format this with using html in the body of the email would be great.
Thanks Deigo. I found this shortly after I posted. Works great. Now the new email what I want the email to look like in html is like this where place holder {3} is the "pre’ tag with the json string.
What happens is instead of the place holders being side by side with the screen shots on the right it instead puts the screen shots just below. So I still want to keep this format but it seems to put it below one another