Using Gmail SMTP Servers in Joomla

Joomla version: 1.5 or greater
PHP version: 5 or greater
Platform: Windows, Linux, FreeBSD

Using Gmail's SMTP servers is easy in Joomla as it comes bundled with the PHPMailer library. Before the PHPMailer library was bundled there seemed to have been a problem with the default Joomla mail and SSL capabilities.

The configuration is outlined below - make sure you replace the fields marked within the brackets [...]. Login to Joomla Admin -> Site -> Global Configuration -> Server. Then under Mail Settings, use the following.

Mailer: SMTP Server
Mail from:[your-dept@your-domain.com]
From Name:[Your Name]
Sendmail Path:/usr/bin/sendmail
SMTP Authentication:Yes
SMTP Security:SSL
SMTP Port:465
SMTP Username: [username@gmail.com]
SMTP Password:[*****]
SMTP Host:smtp.gmail.com

The Sendmail Path seems to be a redundant option above, but all other fields are required. To test the Gmail settings, create a new user via: Site -> User Manager -> New. Congratulations, your new user should have received just now a "new user registration" welcome email from Joomla!




Comments


Kamlesh patidar Getting error : - SMTP Error! Could not connect to SMTP host.

Sanjib Hi Kamlesh,

Do you have the SSL setting on for SMTP Security option?
The settings above usually work without any problem.

BTW, are you testing on live server or development machine (without a real domain name)?

Best,
Sanjib
Peter Thanks a lot! It's work... super.
yanne Hi, I have tested this using my web hosting, it works, but when using localhost, it doesn't. Is there anyway to make it work even for localhost? My computer is connected to internet when i tried.

thanks.

yb
shambavi i am getting "SMTP Error! Could not connect to SMTP host."
and i'm testing in my localhost.
shambavi sorry forgot to enable the plugin called "Gmail Authentication " at the backend.. :) Now it works fine.

- Sham :)

Your Name:
Your Email:
Comment: