开发者

Email formating using System.Net.Mail smtpclient

开发者 https://www.devze.com 2023-02-13 01:54 出处:网络
How do I format the body of the email so it doesn\'t loo开发者_开发问答k so old school :) I\'ve tried sending html through it, but it just comes out as html in the body of the email.

How do I format the body of the email so it doesn't loo开发者_开发问答k 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!


Set the IsBodyHtml property to true.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消