内容简介:翻译自:https://stackoverflow.com/questions/1934130/applying-html-formatting-in-emails-body
格式.我确信我错过了一些东西,或者我需要一双新的眼睛!
以下是添加到<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
以上所述就是小编给大家介绍的《在电子邮件正文中应用HTML格式》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Programming Python
Mark Lutz / O'Reilly Media / 2006-8-30 / USD 59.99
Already the industry standard for Python users, "Programming Python" from O'Reilly just got even better. This third edition has been updated to reflect current best practices and the abundance of chan......一起来看看 《Programming Python》 这本书的介绍吧!