+ 1

Can't send email using mail() in php despite configuring php.ini and sendmail.ini. What is the perfect method?

ERROR: Warning: mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <FILE ADDRESS> on line 8 I'm using wamp server. I have downloaded the sendmail.zip for sending email using PHP and wamp server. I have also configured the php.ini file and the sendmail.ini file but no difference. Always getting the same error when running the email script through wamp. What is the perfect method to send emails using wamp and PHP? And what is possibly going wrong with my case?

21st Nov 2020, 12:02 PM
Ayush Dubey
Ayush Dubey - avatar
4 Respuestas
0
Yes. I'm using gmail service
21st Nov 2020, 12:14 PM
Ayush Dubey
Ayush Dubey - avatar
0
I turned everything which I knew. Kindly mention all that is necessary for it to function.
21st Nov 2020, 12:16 PM
Ayush Dubey
Ayush Dubey - avatar
- 1
Are you sending your mail using gmail service ?
21st Nov 2020, 12:13 PM
Hima
Hima - avatar
- 1
Did you turn on all the necessary stuffs ? access to less secure apps in your Google account ?
21st Nov 2020, 12:15 PM
Hima
Hima - avatar