Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Bhaskar B
How to configure email with liferay
October 11, 2012 12:10 AM
Answer

Bhaskar B

Rank: New Member

Posts: 7

Join Date: September 11, 2012

Recent Posts

Please someone suggest how to configure email details with liferay
Vishal Panchal
RE: How to configure email with liferay
October 11, 2012 12:14 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 280

Join Date: May 20, 2012

Recent Posts

Bhaskar B:
Please someone suggest how to configure email details with liferay


Hi Bhaskar,

Kindly visit this link it has all sufficient steps to configure email details with liferay.

Thanks & Regards,
Vishal R. Panchal
Apoorva Prakash
RE: How to configure email with liferay
October 11, 2012 12:54 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Bhaskar B:
Please someone suggest how to configure email details with liferay


Set the following in portal-ext.properties:
1mail.session.mail.smtp.host=localhost
2mail.session.mail.smtp.password=
3mail.session.mail.smtp.port=25
4mail.session.mail.smtp.user=


Hope this will help...

Thanks and Regards,
Apoorva Prakash
Bhaskar B
RE: How to configure email with liferay
October 11, 2012 1:44 AM
Answer

Bhaskar B

Rank: New Member

Posts: 7

Join Date: September 11, 2012

Recent Posts

ROOT.xml


<Resource
name="mail"
auth="Container"
type="javax.mail.Session"
mail.imap.host="localhost"
mail.pop.host="localhost"
mail.store.protocol="imap"
mail.transport.protocol="smtp"
mail.smtp.host="smtp.gmail.com"
mail.smtp.port="465"
mail.smtp.auth="true"
mail.smtp.starttls.enable="true"
mail.smtp.user="thisisbhaskarb@gmail.com"
password="xxxxxx"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>

portal-ext.properties

mail.session.mail.smtps.auth=true
mail.session.mail.smtps.host=smtp.gmail.com
mail­.session.mail.smtps.password=xxxxxx
mail.session.mail.smtps.port=465
mail.session.mail.s­mtps.user=thisisbhaskarb@gmail.com
mail.session.mail.transport.protocol=smtp

Even though i get message on the console --

08:39:21,509 WARN [liferay/mail-1][MailEngine:560] Failed to connect to a valid mail server. Please make sure one is properly configured. Could not connect to SMTP host: localhost, port: 25


Can you please suggest the waY.
Manish Kumar Jaiswal
RE: How to configure email with liferay
March 27, 2013 2:29 AM
Answer

Manish Kumar Jaiswal

Rank: Regular Member

Posts: 133

Join Date: November 25, 2008

Recent Posts

I am also facing the same issue ..Can someone suggest the solution ..

Regards
Manish
Subhash Shah
RE: How to configure email with liferay
April 8, 2013 3:35 AM
Answer

Subhash Shah

Rank: Junior Member

Posts: 77

Join Date: November 29, 2011

Recent Posts

Bhaskar B:

portal-ext.properties

mail.session.mail.smtps.auth=true
mail.session.mail.smtps.host=smtp.gmail.com
mail­.session.mail.smtps.password=xxxxxx
mail.session.mail.smtps.port=465
mail.session.mail.s­mtps.user=thisisbhaskarb@gmail.com
mail.session.mail.transport.protocol=smtp


The properties mentioned above contains "smtps" instead of "smtp". Is it a typo? Can you please verify if the properties in portal-ext.properties file is typed correctly?

You can also configure it from control panel -> Server Administration -> Mail.

Thanks
Romain Dequidt
RE: How to configure email with liferay
April 9, 2013 11:31 AM
Answer

Romain Dequidt

Rank: New Member

Posts: 10

Join Date: March 9, 2013

Recent Posts

Same issue for me.

I use this version: liferay-portal-tomcat-6.1.1-ce-ga2-20120731132656558.zip

I'm behind a proxy. I don't know if it change anything.
I have my system-ext.properties into the path: liferay-portal-6.1.1\tomcat-7.0.27\webapps\ROOT\WEB-INF\classes\
and it contains:
http.proxyHost=proxy.priv.company.fr
http.proxyPort=3128
http.nonProxyHosts="127.0.0.1|localhost"
https.proxyHost=proxy.priv.company.fr
https.proxyPort=3128
https.nonProxyHosts="127.0.0.1|localhost"

I have tried "ROOT.xml + portal-ext.properties":
- liferay-portal-6.1.1\tomcat-7.0.27\conf\Catalina\localhost\ROOT.xml:
<Context path="" crossContext="true">
<Resource name="mail/MailSession" auth="Container" type="javax.mail.Session"
mail.pop3.host="pop.gmail.com"
mail.pop3.port="110"
mail.smtp.host="smtp.gmail.com"
mail.smtp.port="465"
mail.smtp.user="username@gmail.com"
mail.smtp.password="p@ssw0rd"
mail.smtp.auth="true"
mail.smtp.starttls.enable="true"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
mail.imap.host="imap.gmail.com"
mail.imap.port="993"
mail.transport.protocol="smtp"
mail.store.protocol="imap"
/>
</Context>
- liferay-portal-6.1.1-1\tomcat-7.0.27\webapps\ROOT\WEB-INF\classes\portal-ext.properties:
mail.session.jndi.name=mail/MailSession

I have tried "only portal-ext.properties":
- liferay-portal-6.1.1-1\tomcat-7.0.27\webapps\ROOT\WEB-INF\classes\portal-ext.properties:
mail.session.mail.pop3.host=pop.gmail.com
mail.session.mail.pop3.password=
mail.session.mail.pop3.port=110
mail.session.mail.pop3.user=
mail.session.mail.imap.host=imap.gmail.com
mail.session.mail.imap.port=993
mail.session.mail.store.protocol=imap
mail.session.mail.transport.protocol=smtp
mail.session.mail.smtp.host=smtp.gmail.com
mail.session.mail.smtp.password=p@ssw0rd
mail.session.mail.smtp.user=username@gmail.com
mail.session.mail.smtp.port=465
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.starttls.enable=true
mail.session.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory

I've even used the 'Server Administration' => 'Mail' from the "Control Panel":
Outgoing SMTP Server:
Outgoing Port:
Use a Secure Network Connection: checked
User Name: username@gmail.com
Password: P@ssw0rd

Nothing works...

I always have the message "Failed to connect to a valid mail server. Please make sure one is properly configured. Could not connect to SMTP host: smtp.gmail.com, port: 465"

If I try to switch "smtp" with "smtps" for the "transport.protocol", I have an Exception of authentification.

Any ideas?

Thansk in advance (I spend a lot of time on that stuff)
asif aftab
RE: How to configure email with liferay
January 21, 2014 11:14 AM
Answer

asif aftab

Rank: Junior Member

Posts: 95

Join Date: September 2, 2013

Recent Posts

Add this lines of code in your portal-ext.properties

mail.session.mail.pop3.host=pop.gmail.com

mail.session.mail.pop3.password=PASSWORD

mail.session.mail.pop3.port=110

mail.session.mail.pop3.user=USER

mail.session.mail.imap.host=imap.gmail.com

mail.session.mail.imap.port=993

mail.session.mail.store.protocol=imap

mail.session.mail.transport.protocol=smtp

mail.session.mail.smtp.host=smtp.gmail.com

mail.session.mail.smtp.password=PASSWD

mail.session.mail.smtp.user=USERID@gmail.com

mail.session.mail.smtp.port=465

mail.session.mail.smtp.auth=true

mail.session.mail.smtp.starttls.enable=true

mail.session.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory



* Please user your password in place of PASSWD and your gmail user id in place of USERID.

By three different ways we can configure mail server in Liferay. I am using Liferay 6.2 and initially I got an error that could not connect to smtp host localhost port 25 in liferay by using different code. So I used above code and my mail server is configured properly and my application is able to send mail to the user in forgot password case.

And please see this link. This link help me to solve the issue.

https://www.permeance.com.au/web/tim.telcik/home/-/blogs/how-do-i-configure-liferay-portal-to-use-google-mail

Thanks

asif aftab