Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用php=垃圾邮件或垃圾箱发送邮件_Php_Email_Dns - Fatal编程技术网

使用php=垃圾邮件或垃圾箱发送邮件

使用php=垃圾邮件或垃圾箱发送邮件,php,email,dns,Php,Email,Dns,尽管我在mail-test.com上获得了10/10分,SPF和有效的DKIM,我的电子邮件还是收到了 -用Gmail发送垃圾邮件 -Hotmail和1&1根本无法到达 -到达时没有橙色的问题 我不知道该怎么看,也许这可能与mx有关 这是我的配置,但首先是mail tester报告: <?php ini_set( 'display_errors', 1 ); error_reporting( E_ALL ); $headers =

尽管我在mail-test.com上获得了10/10分SPF和有效的DKIM,我的电子邮件还是收到了

-用Gmail发送垃圾邮件

-Hotmail和1&1根本无法到达

-到达时没有橙色的问题

我不知道该怎么看,也许这可能与mx有关

这是我的配置,但首先是mail tester报告:

    <?php 
        ini_set( 'display_errors', 1 );
        error_reporting( E_ALL );
        $headers = "From: contact@mydomain.com\n"; 
        $headers .= "MIME-Version: 1.0\n";
        $headers .= "Reply-To:  <contact@ mydomain.com >\n";
        $to = "reciever@hotmail.fr";
        $subject = "Website subscription";
        $message = "Hi! \n Thanks for subscribing to mydomain.com. \n
        But in the best case I will end up in spams. It's a pitty. ";
        mail($to,$subject,$message,$headers);
        echo "Test email sent";
    ?>
分数:10/10

-您的服务器212.227.XXX.XXX已被授权使用www-data@mydomain.com

-您的服务器212.227.XXX.XXX已被授权使用contact@mydomain.com

-您的DKIM签名有效

-您不从自己的域发送电子邮件:我们无法验证DMARC

-您的服务器212.227.XXX.XXX与mydomain.com正确关联

-您的主机名mydomain.com已连接到服务器

-您的服务器未被列入黑名单

-反向DNS显示mydomain.com

DNS参数:

    <?php 
        ini_set( 'display_errors', 1 );
        error_reporting( E_ALL );
        $headers = "From: contact@mydomain.com\n"; 
        $headers .= "MIME-Version: 1.0\n";
        $headers .= "Reply-To:  <contact@ mydomain.com >\n";
        $to = "reciever@hotmail.fr";
        $subject = "Website subscription";
        $message = "Hi! \n Thanks for subscribing to mydomain.com. \n
        But in the best case I will end up in spams. It's a pitty. ";
        mail($to,$subject,$message,$headers);
        echo "Test email sent";
    ?>
名称服务器1和1

A 212.227.XXX.XXX

MX mx00.1和1.fr

MX mx01.1和1.fr

MX记录:

服务器电子邮件1和1

发送电子邮件的Php代码:

    <?php 
        ini_set( 'display_errors', 1 );
        error_reporting( E_ALL );
        $headers = "From: contact@mydomain.com\n"; 
        $headers .= "MIME-Version: 1.0\n";
        $headers .= "Reply-To:  <contact@ mydomain.com >\n";
        $to = "reciever@hotmail.fr";
        $subject = "Website subscription";
        $message = "Hi! \n Thanks for subscribing to mydomain.com. \n
        But in the best case I will end up in spams. It's a pitty. ";
        mail($to,$subject,$message,$headers);
        echo "Test email sent";
    ?>
一些标准:

BODY: HTML has a low ratio of text to image area
BODY: Message only has text/html MIME parts 
BODY: HTML has a low ratio of text to image area 
BODY: HTML and text parts are different
Subject is all capitals
BODY: HTML and text parts are different 
其余部分将在此处详细说明:


我还建议您使用第三方API发送所有重要的电子邮件,因为垃圾邮件比率非常低。

将电子邮件标记为垃圾邮件的标准有几个,不仅仅是分数。是的,这就是我添加所有详细信息的原因。我的意思不是说您电子邮件的内容、标题,主题行。请查看我的详细解释中的答案。所谓第三方api,您的意思是使用PHPMailer吗?@michltm不,我的意思是实际使用第三方api。因为使用你的服务器发送大量电子邮件也会将你的ip地址列入黑名单。