我试着发电子邮件。我得到了成功的消息。但我的收件箱里没有收到电子邮件。是不是因为我把xampp安装在D盘而不是C盘?这是我的代码:
<?php
$to = "bikloo.talukdar@gmail.com";
$sub = "My Subject";
$msg = "This is a test message";
if (mail($to, $sub, $msg))
{
echo "Email sent successfully .....";
}
else
{
echo "Email not sent .....";
}
?>我还在php.ini中进行了如下设置:
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = bikloo.talukdar@gmail.com
sendmail_path = "\"D:xampp\sendmail\sendmail.exe\" -t"我在sendmail.ini中的设置:
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=bikloo.talukdar@gmail.com
auth_password=*********
force_sender=bikloo.talukdar@gmail.com我甚至允许访问安全性较低的应用程序。但是我的收件箱里还是收不到邮件。有谁可以帮我?
发布于 2020-11-14 22:47:45
在我的道路上有一个错误
sendmail_path = "\"D:xampp\sendmail\sendmail.exe\" -t"应该是
sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"https://stackoverflow.com/questions/64832847
复制相似问题