Mail() error, can I troubleshoot

i have a form whic h uses mail()

but get

Warning: mail(): Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:\xampp\htdocs\ashley\assets\mail\estimate.php on line 39
ERROR!

How do I set up th e SMTP port through gmail?

1 Like

Those are the wrong values.

Follow this video to setup your SMTP with your google account.

https://www.youtube.com/watch?v=ZfEK3WP73eY&t=55s

1 Like

Furthermore, to use Gmail to send email, you need to go beyond just setting it up correctly in your code. Please read this post I made some months ago. Google regularly updates its policy, so you might want to check that it is still working on a regular basis.

1 Like

Yes. Google is famous for killing services out of the blue.

The smtp still working. Just checked :crossed_fingers:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.