Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Amit Kumar Singh
Mail is not working with liferay
December 26, 2010 6:39 AM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

I tried to setup the mail configuration from control panel but mail functionality is not working with liferay. I configured Root.xml and tried with gmail and also own server but still mail server is not working. I tried with portal.properties to set smtp configuration but still there is issue with liferay to sending mail. Let me know if any one have idea regarding this issue. thanks in advance to all liferay users.
Apoorva Prakash
RE: Mail is not working with liferay
December 26, 2010 8:49 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Hello Amit,
I've got email working on my project stack with SMTP settings in portal-ext.properties file... Hope you are doing some tiny mistake... But the things you are mentioning are not explaining your problem clearly... Please explain in detail, and mention code snippet if needed...

Thanks and Regards...
Amit Kumar Singh
RE: Mail is not working with liferay
December 28, 2010 4:43 AM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

Hi Apoorva,

Thanks for your response. Below, i mentioned code of bunch for portal.properties & Root.xml that i configured in my liferay.

portal.properties

mail.session.mail.transport.protocol=smtp
mail.session.mail.smtp.host=smtphost
mail.session.mail.smtp.password=pass
mail.session.mail.smtp.user=user
mail.session.mail.smtp.port=25
mail.session.mail.smtp.auth=true

root.xml

<Resource
name="mail/MailSession"
auth="Container"
type="javax.mail.Session"
mail.imap.host="imap.gmail.com"
mail.imap.port="993"
mail.pop.host="pop.gmail.com"
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=""
password=""
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>

i tried both example. so please let me know where i am doing wrong.
Manish Kumar Gupta
RE: Mail is not working with liferay
December 28, 2010 7:29 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

Hey Amit,

When you are configuring mail using root.xml, you need to add mail.session.jndi.name=mail/MailSession in your portal-ext.properties. Have you done that?
Amit Kumar Singh
RE: Mail is not working with liferay
December 28, 2010 9:24 PM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

HI Manish,

I tried to add mail.session.jndi.name=mail/MailSession in portal.properties. But still, i am not able to send mail. While testing for forget password, it's showing me that password sent successfully but user is not getting any mail. Please help me to resolve this issue.

Thanks.
Manish Kumar Gupta
RE: Mail is not working with liferay
December 28, 2010 9:46 PM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

Can you attach you portal-ext.properties? You can remove your mail password but I was other details as it is.

Also, it may be that portal is not able to detect your ext properties file. Where are you copying portal-ext.properties?
Amit Kumar Singh
RE: Mail is not working with liferay
December 28, 2010 10:00 PM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

I attached portal.properties. Please have a look.
portal.properties dir = Root\Web-Inf\Classes\portal.properties
Attachments: portal-ext.properties (0.4k)
Manish Kumar Gupta
RE: Mail is not working with liferay
December 28, 2010 9:58 PM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

Is this the actual portal-ext.properties or you have removed values for mail.session.mail.smtp.host, mail.session.mail.smtp.user etc?
Amit Kumar Singh
RE: Mail is not working with liferay
December 28, 2010 10:00 PM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

i removed smtp, user and pass.
Manish Kumar Gupta
RE: Mail is not working with liferay
December 28, 2010 10:14 PM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

My last 2 suggestions -

1. Try after removing mail resource entry from root.xml and property mail.session.jndi.name=mail/MailSession from portal-ext.properties.

2. Make sure that your portal-ext.properties is being picked by the portal. To verify this, go to control panel -> server administration -> properties -> portal properties.
Amit Kumar Singh
RE: Mail is not working with liferay
December 28, 2010 10:38 PM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

i verified portal.properties. it's setting all the configuration. but still, issue not resolved.
Christopher Lui
RE: Mail is not working with liferay
December 29, 2010 11:11 AM
Answer

Christopher Lui

LIFERAY STAFF

Rank: Junior Member

Posts: 38

Join Date: March 22, 2010

Recent Posts

Hi Amit,

Have you seen this blog? http://www.liferay.com/web/craig.kaneko/blog/-/blogs/243468/maximized

It is an easy way to setup Gmail.

Thanks,
Chris
Amit Kumar Singh
RE: Mail is not working with liferay
December 30, 2010 10:35 PM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

Hi Christopher,

i tried with this also but mail service is not working.
raghu batchu
RE: Mail is not working with liferay
December 31, 2010 9:29 AM
Answer

raghu batchu

Rank: New Member

Posts: 9

Join Date: August 23, 2009

Recent Posts

Hi Amith

verify your outgoing smtp server ip and outgoing port number under Control panel --> Server administrator --> mail

Thanks
Raghu
Gaurav Jain
RE: Mail is not working with liferay
February 9, 2011 11:31 PM
Answer

Gaurav Jain

Rank: Regular Member

Posts: 141

Join Date: January 31, 2011

Recent Posts

Hey Amit,

have you resolved out your problems with email?
Amit Kumar Singh
RE: Mail is not working with liferay
February 10, 2011 7:14 PM
Answer

Amit Kumar Singh

Rank: Junior Member

Posts: 71

Join Date: October 11, 2010

Recent Posts

Hi Gaurav,

I resolved my issue. Are you facing the problem????
Eldho Issac
RE: Mail is not working with liferay
December 20, 2012 2:44 AM
Answer

Eldho Issac

Rank: New Member

Posts: 4

Join Date: November 28, 2012

Recent Posts

Hi Amit
plz share how u resolved this problem.

Thanks