gpt4 book ai didi

php - 如何防止邮件变成垃圾邮件?

转载 作者:行者123 更新时间:2023-12-02 07:42:40 27 4
gpt4 key购买 nike

下面是我发送邮件给用户的标题-

$to='example@example.com';
$recipient='example@example.com';
$headers = "From: noreply@xxx.com" . "\r\n";
$headers .= "X-Sender: <" . "$to" . ">\r\n";
$headers .= "Return-Path: <" . "$to" . ">\r\n";
$headers .= "Error-To: <" . "$to" . ">\r\n";
$headers .= "Content-Type: text/html\r\n";

mail("$recipient", "$subj", "$body", "$headers")

但是当我进入垃圾邮件时出现问题(在 gmail 中)gmail 说:-

X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - myexoticfriends.myexoticfriends.com
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [510 32003] / [47 12]
X-AntiAbuse: Sender Address Domain - myexoticfriends.myexoticfriends.com
X-Source: /usr/bin/php
X-Source-Args: /usr/bin/php /home/exotic/public_html/test/test.php
X-Source-Dir: myexoticfriends.com:/public_html/test

最佳答案

尝试使用不同的 STMP 服务器,如果您有 Gmail 帐户,您可以尝试使用 SwiftMailer。 http://swiftmailer.org/ .此外,请记住您的服务器的 IP 地址可能会列在某些 DNS 或 SMTP 黑名单中,请尝试在 http://www.dnsbl.info/ 中查找您的 IP。

不过,如果您要发送大量电子邮件,我建议您使用邮寄服务。我们使用了 http://postmarkapp.com/而且效果很好。

关于php - 如何防止邮件变成垃圾邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9410248/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com