使用域名作为messgae内容时,邮件功能停止工作

时间:2016-09-07 07:23:05

标签: php email gmail

下面的脚本工作正常,直到我将消息更改为" domain.org"。现在它显示成功消息但我甚至没有收到任何电子邮件,即使不是垃圾邮件。如果我将消息更改为" domain.com"工作正常。

    $from = "info@domain.com";
    $to = "testmail@gmail.com";
    $subject = "PHP Mail Test script";
    $message = "domain.org";
    $headers = "From:". $from;
    $mail = @mail($to,$subject,$message, $headers);
    if($mail){
    echo "Test email sent";
    }else{
    echo "Mail not sent";
    }

有什么想法解决这个问题吗?

0 个答案:

没有答案