我幾乎花了一天時間就可以了,但不能修復它,發送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