I am trying to send mail from localhost.
I changed files php.ini and sendmail.ini and still not working. I am also turned on "Less secure app access" in Gmail account security
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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.