How to configured Gmail SMTP server in Liferay.

To use gmail as smtp server in liferay follow the below steps:

1. Go Control Panel>Portal Settings and set

        Mail Domain (Required): gmail.com
Portal Settings for Gmail conf.



















2.Go Control Panel>Server Administration>Mail and set the following fields as below
Incoming POP Server                             : pop.gmail.com
Incoming Port                                         : 995
Use a Secure Network Connection        : yes
User Name                                             : yourid@gmail.com
Password                                                : Your gmail Password
Outgoing SMTP Server                          : smtp.gmail.com
Outgoing Port                                         : 465
Use a Secure Network Connection        : yes
User Name                                             : yourid@gmail.com
Password                                               : Your gmail Password

Manually specify additional JavaMail properties to override the above configuration:

mail.smtp.socketFactory.port: 465
mail.smtp.socketFactory.class:javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback:false
mail.smtp.auth: true

Mail Config




















And you should also allow your account access from external devices.
Below I listed step for allow gmail account access.
1.Login gmail account and go https://accounts.google.com/b/0/DisplayUnlockCaptcha
and enable this feature.

2. Go to https://myaccount.google.com/?pli=1 and Off two step verification
3. Got https://myaccount.google.com/?pli=1 and allowed access for less secure apps.

Enjoy.....

Comments