这是我的代码
$subject = "Welcome to Last Alliance Standing";
$message = "$name Welcome to Last Alliance Standing, Your account has been registered and you are now able to login and play";
$headers = "From: Team Laser<noreply@lastalliancestanding.com>\r\n";
$headers .= "X-Mailer: Drupal\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
if (mail($email, $subject, $message, $headers)) {
header("location: passwordrequest-success.php");
exit();
} else {
echo "Not Sent";
}
电子邮件并不总是发送,尽管有时会发送,但有时我会收到“未发送”错误