PHP邮件发送不起作用

时间:2017-05-27 06:21:34

标签: php email html-email

我正在尝试使用以下php脚本发送电子邮件。它给了我“邮件发送”状态,但它实际上不会向gmail和yahoo帐户发送邮件。

<?php

$to      = "xxxxx@yahoo.com";

$subject = 'subject'; // Give the email a subject
$message = '

        Thanks for signing up!
        Your account has been created. ';


$headers .= 'From:noreply@ccs.com' . "\r\n";
$headers .= 'Bcc:xxxxx@gmail.com' ."\r\n";
$headers .= 'Bcc:yyyyy@gmail.com' ."\r\n";

mail($to, $subject, $message, $headers);

echo "mail sent";

?>

0 个答案:

没有答案