我几乎花了一天时间就可以了,但不能修复它,发送HTML内容
我感到电子邮件正文中发送HTML(asp.net 3.5),但问题是,它既不需要内格身体也没有任何内嵌样式,
message.Body = "<html>"+
"<body>"+
"<div style=\"background-color:yellow;\">" +
"<h3>"+
" Congrats" + " " + userName + " " + " You have been shortlisted for interview. Please appear on " + " " + date +", "+time+" "+ "for interview"+
"</h3>"+
"</div>"+
"</body>"+
"</html>";
大胆的作品标签很好,/,但它没有考虑身体的任何风格,甚至div标签,为什么呢?
您能否列出完整的发送代码?你在检查什么电子邮件客户端?连接大量字符串时,请考虑[StringBuilder](http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx)。或者在这种情况下,也许http://stackoverflow.com/questions/886728/generating-html-email-body-in-c-sharp – MikeSmithDev