Could not connect to SMTP host: localhost, port: 465

thumbnail
Kiran Yalavali, modified 6 Years ago. Regular Member Posts: 175 Join Date: 10/15/14 Recent Posts
Hi,

I am using liferay 6.0 version
I am getting this error in my log file .
[MailEngine:482] Failed to connect to a valid mail server. Could not connect to SMTP host: localhost, port: 465

bellow mail server configuration settings in Server Administration but how to get mail from fromAddress manually entered  mail for custom portlet.

Incoming pop server         : localhost
Incoming port:                   : 110
Outgoing SMTP Server    : smtp.gmail.com
Outgoing Port                    : 465


Please help me to resolve this.
thumbnail
Nirav Prajapati, modified 6 Years ago. Regular Member Posts: 133 Join Date: 6/25/15 Recent Posts

Hi

 

Please refer below URL for Gmail configuration.

http://liferayiseasy.blogspot.com/2015/09/mail-configuration-in-liferay-using.html

 

Please make sure your Gmail have activated Use of less secure apps.

Check it here: https://myaccount.google.com/lesssecureapps

thumbnail
Kiran Yalavali, modified 6 Years ago. Regular Member Posts: 175 Join Date: 10/15/14 Recent Posts

Thank you for reply Nirav,

 

Incoming pop server                                         : pop.gmail.com
Incoming port:                                                   : 110

Use a Secure Network Connection                  : select the check box

Username                                                          : 123@gmail.com

password                                                           : 12345
Outgoing SMTP Server                                     : smtp.gmail.com
Outgoing Port                                                     : 465

I'm follow above mail server configuration in server administrationmail mail send succesfully.

 

but my requirement is I'm not given username and password mail server configuration in server administration i need send mail only custom portlet like fromAddress given 1234@gmail.com and toAddress given xyz@gmail.com I need recive mail from fromAddress ,is it possible ??

thumbnail
Nirav Prajapati, modified 6 Years ago. Regular Member Posts: 133 Join Date: 6/25/15 Recent Posts

Hi Kiran,

 

For this kind of requirement, you have to write your own code for mail sending, where you have to give input box for Sender mail address and password and another input box for the receiver mail address.

 

It's a very simple job.

Only you need to write 20-25 lines. That's it.