调试有时会很忙……我该如何处理这个mail
功能?似乎我需要更改一些设置,但我不知道如何处理它们:当我尝试在我的论坛上发布回复时,会弹出此错误:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\mysite\forum part two\post_reply_parse.php on line 72
我在第 72 行的代码是这样的
mail($to, $subject, $message, $headers);
我的邮件代码是这样的
$email = '';
$email = substr($email, 0, (strlen($email) - 2));
address with your domain at the end
$to = "";
$from = "";
// $bcc is the list of emails that will be sent out as blind carbon copies
$bcc = $email;
$subject = "YOUR_SUBJECT_HERE";
$message = "YOU MESSAGE CONTENT HERE";
$headers = "From: $from\r\nReply-To: $from";
$headers .= "\r\nBcc: {$bcc}";
// Send out the email
mail($to, $subject, $message, $headers);
我不想忽略这个错误,我很想了解如何修复它。