【发布时间】:2017-07-15 13:08:30
【问题描述】:
我创建了一个非常简单的 HTML 电子邮件,并且正在对其进行测试。在 Apple Mail 和 mailtrap 中它看起来很完美,但在 Spark 中它看起来像纯文本电子邮件。
Title Goes Here
Body goes here
— Company
我收到了来自 Twitter 的具有相同布局的电子邮件,它们在 Spark 中看起来很完美……我所有的样式都是内联的,代码非常基本;我什至尝试过使用不同的文档类型和不使用谷歌字体,但结果相同。
我看不出我做错了什么。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<title>Notification</title>
</head>
<body style="padding: 10px; background-color: #f6f6f6" bgcolor="#f6f6f6">
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; border-radius: 3px; background-color: #ffffff; border: 1px solid #e9e9e9">
<tr>
<td style="border-radius: 3px 3px 0 0; background-color: #cccccc; padding: 40px 0">
<p style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 2em; color: #ffffff; text-align: center">
Title Goes Here
</p>
</td>
</tr>
<tr>
<td style="padding: 40px; color:#222222">
<p style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;">
Body goes here
</p>
<p style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-top: 30px">
— Company
</p>
</td>
</tr>
</table>
</body>
</html>
【问题讨论】:
标签: html css email html-email