邮件发送到gmail时工作,不发送到雅虎时

时间:2015-11-16 17:31:36

标签: php email

我有一个标准代码,用于发送电子邮件作为验证过程。当我使用gmail地址注册时,一切正常(电子邮件立即发送)。当我在雅虎注册时,没有。等了几天,什么都没有。没有垃圾邮件,只是墓地。

我的配置:

mail.add_x_header   On  On
mail.force_extra_parameters no value    no value
mail.log    no value    no value
sendmail_from   no value    no value
sendmail_path   /usr/bin/php -C --php-ini /etc/php-console.ini /var/mailer2/mailer.php  /usr/bin/php -C --php-ini /etc/php-console.ini /var/mailer2/mailer.php
Path to sendmail    /usr/bin/php -C --php-ini /etc/php-console.ini /var/mailer2/mailer.php

代码:

    $hash = md5( rand(0,1000) );
    $to = $email; 
    $subject = 'Signup | Verification';
    $message = '

                Thanks for signing up!
                Your account has been created, you can login with the following credentials after you have activated your account by pressing the url below.

                ------------------------
                Username: '.$username.'
                Password: '.$password1.'
                ------------------------

                Please click this link to activate your account:
                email='.$email.'&hash='.$hash.'

                ';
    $headers = "From: donotreply@domain.com\r\n";
    mail($to,$subject,$message,$headers);

有什么想法吗?

0 个答案:

没有答案