更新时间:2022-11-07 16:36:42
setMailMessage.IsBodyHtml
为true
然后您可以构建HTML正文并发送。
您可以为S1和S2内容使用两个HTML表格。然后在构建完整的html后,将其设置为Body
的MailMessage
示例代码 [ ^ ]
set theMailMessage.IsBodyHtml
astrue
then you can build HTML body and send.
You can use two HTML tables for your S1 and S2 contents. then after you build full html, set it asBody
of theMailMessage
Sample code[^]
除了解决方案1:请参阅我对此解决方案的评论。 b $ b
请参阅:
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.isbodyhtml%28v=vs.110% 29.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/System.Net.Mail.MailMessage%28v=vs.110%29.aspx [ ^ ],
http:/ /msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.bodyencoding%28v=vs.110%29.aspx [ ^ ]。
关于内容类型: http://en.wikipedia.org/wiki/Internet_media_type [ ^ ]。
内容类型由IANA标准化和维护:
http://www.iana.org/assignments/media-types/ [ ^ ],
另见: http://en.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority [ ^ ]。-SA
In addition to Solution 1: please see my comment to this solution.
Please see:
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.isbodyhtml%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/System.Net.Mail.MailMessage%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.bodyencoding%28v=vs.110%29.aspx[^].
About content types: http://en.wikipedia.org/wiki/Internet_media_type[^].
Content types are standardized and maintained by IANA here:
http://www.iana.org/assignments/media-types/[^],
see also: http://en.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority[^].—SA