我知道这个问题之前已经被问过了。
当我调用PHP的mail()函数时,它返回true。
我检查了我的php.ini文件(我正在运行CentOS):
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
mail.add_x_header = On
我在论坛上读到需要安装sendmail。所以我安装了它。现在带有mail()功能的网站无法加载。因此,我卸载了sendmail,然后mail()函数再次返回true,但无法发送邮件。
你有什么想法吗?
mail()
函数发送的邮件而不使用SMTP时。 - Joe