[英]How to configure XAMPP to send mail from localhost to gmail?
I am trying to send mail from localhost. 我正在尝试从localhost发送邮件。
I changed files php.ini and sendmail.ini and still not working. 我更改了文件php.ini和sendmail.ini但仍然无法正常工作。 I am also turned on "Less secure app access" in Gmail account security
我还在Gmail帐户安全性中启用了“安全性较低的应用访问权限”
php.ini php.ini中
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = my-email@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
mail.add_x_header=Off
sendmail.ini sendmail.ini
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=my-email@gmail.com
auth_password=my-email-password
force_sender=my-email@gmail.com
You also need to allow less secure apps from your google account. 您还需要允许来自Google帐户的安全性较低的应用。
https://support.google.com/accounts/answer/6010255?hl=en https://support.google.com/accounts/answer/6010255?hl=en
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.