Send mail with php on localhost
SKDDEV
Posted on June 12, 2019
dev environnment
PHP 7.2.11
Laragon
Hello Guys,
please, help me,
I am developing a website using PHP. i want to send (email on localhost to my gmail account.
here are my sendmail.ini file config
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=auto
error_logfile=error.log
debug_logfile=debug.log
auth_username=account@gmail.com
auth_password=*************
force_sender=account@gmail.com
And i set the sendmail path in php.ini file
Also i disable two factors authentication and enable Less secure application access in my gmail account setting
So
when i send the email, it worked and i receive it in format text in the output directory localized in C:\laragon\bin\sendmail\output but not in my gmail account inbox
Here is the error that i get in error.log file (19/06/12 15:50:53 : Must issue a STARTTLS command first. r3sm21418441wrr.61 - gsmtp)
Posted on June 12, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.