<?php
$sendto = "[email protected]";
$subject = "email confirmation"; // Subject
$message = "the body of the email - this email is to confirm etc...";
# send the email
mail($sendto, $subject, $message);
?>
這是我編寫的用於在localhost上測試郵件功能的代碼。 我已經多次在瀏覽器中運行該腳本,但仍然在我的郵箱中收到任何電子郵件。php郵件功能
我是否需要其他配置?
thx提前!
你確定它沒有在您的垃圾郵件文件夾結束了? – 2010-05-03 09:29:30
您需要在執行腳本的服務器上運行郵件服務器 – knittl 2010-05-03 09:29:53
如果您正在運行Windows,則只需要郵件服務器。是localhost的Windows? – Reece45 2010-05-03 14:33:05