编写HTML电子邮件时遇到问题

时间:2014-04-17 18:25:33

标签: html html-email

我正在尝试撰写HTML电子邮件,而且我已经在网上寻找了无数的教程,似乎无法让它们发挥作用。我写的是:

<!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 http-equiv="Content-Type" content="text/html; charset=UTF-8" />

  <title>Demystifying Email Design</title>

  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

</head>



<body style="margin: 0; padding: 0;">

 <table border="1" cellpadding="0" cellspacing="0" width="100%">

  <tr>

   <td>

    Hello! how is everything

   </td>

  </tr>

 </table>

</body>

</html>

哪个应该在电子邮件中显示html,但事实并非如此。我使用outlook.com生成html电子邮件。有什么设置我需要用来写一个HTML电子邮件或我使用错误的代码?有任何想法吗?谢谢!

我知道我可以查看HTML电子邮件,因为我收到来自mailChimp的电子邮件,并且它们呈现正常。

〜MYY

3 个答案:

答案 0 :(得分:0)

你看过这个页面吗?它说在发送电子邮件之前需要配置一些设置。

http://office.microsoft.com/en-us/outlook-help/change-the-message-format-to-html-rich-text-or-plain-text-HP001232996.aspx

答案 1 :(得分:0)

你不应该真的从Outlook发送html电子邮件,但这里是如何让html呈现:

查看在网络浏览器中呈现的代码,ctrl+a选择全部。将其复制并粘贴到电子邮件正文中。

这不是一个好习惯,但它会完成工作。如果您要发送批量电子邮件,您应该查看ESP,如Campaign Monitor,Mailchimp或Constant Contact。

答案 2 :(得分:0)

这里的标题信息对我有用,如果你想尝试一下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;" />
<title>Email Title</title>
</head>
<body>
asdf
</body>
</html>