我差不多花了一天时间,却无法修复它,
我在电子邮件正文中发送HTML(asp.net 3.5),但问题是它既不需要div也不需要内联样式,
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标签,为什么?
答案 0 :(得分:1)
在MailMessage上将IsHTML标志设置为true。