nkuebelbeck
nkuebelbeck

Reputation: 283

Email formating using System.Net.Mail smtpclient

How do I format the body of the email so it doesn't look so old school :) I've tried sending html through it, but it just comes out as html in the body of the email.

Thanks for any help and assistance, cheers!

Upvotes: 0

Views: 1128

Answers (2)

jonezy
jonezy

Reputation: 1923

Including the above, I use StringBuilder's to format the contents of my emails like so:

StringBuilder sb = new StringBuilder();
sb.AppendFormat("{0} submitted the following information from the site:", txtName.Text);

I just find it's helpful in visualizing the outcome rather than doing +='s and such.

Upvotes: 0

RandomWebGuy
RandomWebGuy

Reputation: 1439

Set the IsBodyHtml property to true.

Upvotes: 8

Related Questions