How to configure WAMP (localhost) to send email using Gmail?


Question

I want to use the mail() function from my localhost. I have WAMP installed and a Gmail account. I know that the SMTP for Gmail is smtp.gmail.com and the port is 465 (more info from gmail). What I need to configure in WAMP so I can use the mail() function?

Thanks!!

1
45
11/16/2010 2:32:14 PM

Accepted Answer

Gmail servers use SMTP Authentication under SSL or TLS. I think that there is no way to use the mail() function under that circumstances, so you might want to check these alternatives:

They all support SMTP auth under SSL.

You'll need to enable the php_openssl extension in your php.ini.

Additional Resources:

28
12/29/2015 7:02:15 PM

I've answered that here: (WAMP/XAMP) send Mail using SMTP localhost (works not only GMAIL, but for others too).


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon