<?php
ini_set('display_errors', '1');
include '../application/includes/config.php';
$mailto=$_POST['email'];
$subject="Information";
$message_body="Welcome to the digital world!";
$from="info@mydomain.com";
$mail = mail($mailto,$subject,$message_body,"From:".$from);
if($mail){
echo "Thank you for using our mail form";
}else{
echo "Mail sending failed.";
}
?>
我已在其他网站上测试过此代码。它在那里工作,但在我的服务器上它只显示“邮件发送失败”错误..