我正在构建一个电子邮件收据,在用户注册我们的一个网站上即将举行的活动后,该收据会返回给用户,但 gmail 始终将其发送到垃圾邮件文件夹。我已将此问题隔离到此 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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Zzzzzzz Online PATHe Registration</title>
</head>
<body>
<p>Dear <?php echo $data['f_name']; ?>,</p>
<p>
Thank you for registering for our upcoming open house. We will be in
touch shortly to arrange a meeting time on <?php echo $data['date'];?>.
</p>
<p>
The open house will be given at our Zzzzzzz Avenue Campus located at
175 Zzzzzzz Ave, Zzzzzzz AL.
Look up directions on <a href="<?php echo $gmaps;?>" target="_blank">
Google Maps</a> or <a href="<?php echo $mapq;?>" target="_blank">Mapquest</a>.
</p>
<p>We look forward to meeting you,</p>
<p>
<a href="http://online.zzzzzzz.edu">Zzzzzzz College Online</a><br/>
<a href="mailto:info@zzzzzzz.edu">info@zzzzzzz.edu</a><br/>
(877)772-2265
</p>
</body>
</html>
我试过这些东西:
- 具有完全验证的 doctype 的 Html
- 用全长 url 替换了地图站点的缩短 url
- 尝试了没有任何网址的电子邮件
所以我能想到的只是所使用的语言,但这是一个完全有效的回应。填写此表格的用户要求学院与他们联系,以便为他们选择的日期安排会议。我在这里想念什么?
编辑:以下内容通过垃圾邮件测试就好了。具有讽刺意味的是,我们从这个开始但重写了它,因为它太笼统了,并且没有为用户提供有关开放日位置的可操作信息:
<!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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Zzzzzz Online Open House Registration</title>
</head>
<body>
<p>Dear Micah,</p>
<p>Thank you for registering for our upcoming open house. We will be in touch
shortly to arrange a time and to answer any questions you may have.</p>
<p>For directions and more information, please visit out open house page at
http://online.zzzzzzz.edu/open-house. In the meantime, if you have any
questions or concerns that come up between now and the open house please feel
free to contact us.</p>
<p>We look forward to meeting you,</p>
<p>Zzzzzz College Online</p>
</body>
</html>