我的 php.ini 看起来像这样:
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = you@yourdomain
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "/usr/sbin/sendmail -t -i -f akeel_mn@yahoo.com"
我的 php 代码如下所示:
<?php
if(isset($_REQUEST['mail']))
{
$success = mail("akeel26@gmail.com","hello","Welcome to our site!");
if($success)
{
echo 'mail send';
}
else
{
echo 'error';
}
}
?>
当我运行程序时,它显示为邮件发送,但邮件没有发送到预期的收件人..有人知道出了什么问题吗?除了 php.ini 之外,还有其他配置吗?