使用 PHP 发送电子邮件(防止被放入垃圾邮件文件夹)
我正在尝试使用 PHP 脚本发送电子邮件...但是,收件人在他/她的垃圾邮件文件夹中收到它 - 这不是所需的结果(我希望将其直接发送到他们的收件箱,这样我就不会必须警告他们查看垃圾邮件文件夹)。
下面是我使用 PEAR 发送电子邮件的代码...我可以进行哪些更改来防止电子邮件进入 SPAM 文件夹?
send("[email protected]", $headers, $body); ?>i am trying to send email using PHP scripts... however, the recipient is receiving it in his/her SPAM folder -this is not the desired result (I would like to have it sent directly to their inbox so that I don't have to warn them to look in their SPAM folder).
below is the code I use to send the email using PEAR... what changes can I make to prevent the emails from going into the SPAM folder?
send("[email protected]", $headers, $body);
?>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一般来说,电子邮件在接收端而不是发送端被分类为垃圾邮件或非垃圾邮件 - 否则,垃圾邮件发送者会简单地说他们的所有邮件都不是垃圾邮件,这完全违背了目的。因此,您不能仅仅强制将邮件发送到发件人的收件箱。
但是,您可能需要做的是查看用于发送邮件的计算机当前是否列在任何垃圾邮件阻止列表中,如果是,请采取必要的步骤将其从这些阻止列表中删除。最常见的可能是 Spamhaus。
In general, email is classified as spam or not spam on the receiving end, not the sending end - otherwise, spammers would simply say that all of their messages aren't spam, completely defeating the purpose. Thus, you can't just force a message to go to a sender's inbox.
However, what you may need to do is see if the machine that you're using to send mail is currently listed on any spam blocklists, and if so, take the necessary steps to remove it from those blocklists. The most common is probably Spamhaus.
如何增加接收者不将电子邮件标记为垃圾邮件的机会已经在这里讨论过很多次了。例如
你如何确保您以编程方式发送的电子邮件不会自动标记为垃圾邮件?
但是可能有一些特定于 pear 的邮件包的提示,说明如何实现这些步骤(所以我不会认为这是重复的......)。
How to increase the chance that the receiver doesn't mark an email as spam has been discussed quite some times here on SO. E.g.
How do you make sure email you send programmatically is not automatically marked as spam?
But there may be some tips specific to pear's Mail package on how to implement these steps (so I wouldn't consider this a duplicate ...yet).
您几乎可以为您的域购买专用IP地址来解决这个问题。安装专用静态 IP 后,您的所有电子邮件都将拥有唯一的永久发件人 ID...
GMail 和其他顶级邮件服务将在收件箱中列出您的电子邮件...但雅虎和其他一些网站不会介意...
You can purchase a dedicated IP address for your domain to patch this problem almost. After installing a dedicated static IP,all your email will have unique permanent sender ID...
GMail and other top mail services will list your email in Inbox...But yahoo and some other won't mind it....