格式.我确信我错过了一些东西,或者我需要一双新的眼睛!
以下是添加到<head>的信息的网页
<head runat="server"> <link href="~/MyStyle.css" rel="stylesheet" type="text/css" /> </head>
Mystyle.css包含以下内容
span.orange { color: #FF6D06; font-family: tahoma; font-size: 10pt; }
这是身体的一部分……
Dim HtmlString as string = "<span class='orange'>This one should be painted</span>"
这是使用Net.Mail发送的
Dim objMail As New Mail.MailMessage (blah, blah blah) objMail.IsBodyHtml = True
更新:首先感谢您的意见.电子邮件本身不以任何方式以样式表引用.那么除了将样式表附加到电子邮件之外,我还有哪些选项?
<html> <head> <style type="text/css"> span.orange { color: #FF6D06; ... } </style> </head> ...
避免在HTML电子邮件中引用外部实体(如样式表,图像等).这些引用可能不可用,具体取决于用户的邮件代理设置.另外,了解邮件代理中的HTML支持.它可能没有你想象的那么丰富.例如 Here’s some information on Outlook .
翻译自:https://stackoverflow.com/questions/1934130/applying-html-formatting-in-emails-body
我来评几句
登录后评论已发表评论数()