此代码应该向我的 hotmail 地址发送电子邮件:
<?php
$subject = 'test';
$from = 'test@test.com';
$reply_to = 'test@test.com';
$message = 'test';
$headers = "From: ".$from. "\r\n" . "Reply-To: ".$reply_to. "\r\n" . "X-Mailer: PHP/" . phpversion();
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=utf-8\r\n";
mail('my_hotmail_address@hotmail.com', $subject, $message, $headers);
?>
然而,在我的两个托管服务提供商上,它什么也没做。