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

Jonathan picture Jonathan · Mar 1, 2009 · Viewed 178.4k times · Source

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!!

Answer

Christian C. Salvadó picture Christian C. Salvadó · Mar 2, 2009

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: