我正在尝试使用以下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";
?>