Fórum

Mail Portlet in 5.1

Richard Becher, modificado 15 Anos atrás.

Mail Portlet in 5.1

Junior Member Postagens: 55 Data de Entrada: 20/06/08 Postagens Recentes
Hi there,

I know there were issues with the mail portlet in previous versions. I am wondering if any of these were addressed in 5.1.

The essential issue for me is that I have not been able to fully understand how the mail portlet works - or to get it working.

Here is my situation / goal.

1. I want the ability to leverage an existing mail server (i.e. MS Exchange). However, for my own learning process I can / have set up a James Mail server locally.

2. I want the ability for users in Liferay Portal to specify their own unique email address for communication. Is this possible?

For instance, if my username is richard and the host is www.123.com - can I still specify an email address of richard@somewhereelse.com for use with the mail portlet to send email from the Portal?

3. I have read the documentation I could find in the Wiki but have not been able to get it set up and working. This could be the result of an inadequate mail server setup - so any help / information from beginning to end would be greatly appreciated.

Thanks!

Richard
u vali, modificado 15 Anos atrás.

RE: Mail Portlet in 5.1

New Member Postagens: 3 Data de Entrada: 12/08/08 Postagens Recentes
Hi,

Guessing how Mail Portlet is working is very frustrating because of the lack of a clear documentation. After lot of research on the net and on the Liferay forums here what I have find (this works for me):

Supposing I have created an user with screenName = testUser, email adresse = testUser@domain.com and password = testUserpass. Internally Liferay will associate a numerical userId, for example 10908

Now, we have two parts: sending mails and retrieving mails.

For sending mails:
in $TOMCAT_DIR/conf/Catalina/localhost/ROOT.XML you must create an JNDI entry like that:

<!-- Mail -->
<Resource name="mail/MailSession" auth="Container" type="javax.mail.Session"
mail.imap.host="mail.domain.com"
mail.pop3.host="mail.domain.com"
mail.smtp.host="mail.domain.com"
mail.store.protocol="imap"
mail.transport.protocol="smtp"/>

where mail.domain.com is the mail server.

Also, the "Mail Domain" champ of Settings tab of Enterprise Admin Portlet must have the value "domain.com" (your mail domain)

With that at least the "forgot password" functionality will work, you can test it.

For receiving mail:

Remember, we have the new user with the following parametres:

screenName = testUser
email adresse = testUser@domain.com
password = testUserpass
userId = 10908

The mail portlet works like that, it try to connect to pop3 host with userId and password. So, on the server it must be created an account with name=10908 and password=testUserpass. Also iy must be created an alias=testUser. In my opinion this is a strange mecanism because normaly the mail accounts are not numerical.

If you want Mail Portlet to connect with screenName you must modify the _createStore method in MailUtil class.

The last setting you deal with it is in portal-ext.properties.

mail.box.style=INBOX.
mail.inbox.name=INBOX

These values work for my pop3/imap server (Cyrus). You must find what it work with your pop3 server.

uvali
maristella bartolini, modificado 15 Anos atrás.

RE: Mail Portlet in 5.1

New Member Postagens: 8 Data de Entrada: 30/10/08 Postagens Recentes
Hi!

I'm having the same problem, I have configured my gmail account, and I can send mail, but I can't see them.

So, can you explain what it mean?

For receiving mail:

Remember, we have the new user with the following parametres:

screenName = testUser
email adresse = testUser@domain.com
password = testUserpass
userId = 10908

The mail portlet works like that, it try to connect to pop3 host with userId and password. So, on the server it must be created an account with name=10908 and password=testUserpass. Also iy must be created an alias=testUser. In my opinion this is a strange mecanism because normaly the mail accounts are not numerical.

If you want Mail Portlet to connect with screenName you must modify the _createStore method in MailUtil class.

The last setting you deal with it is in portal-ext.properties.

mail.box.style=INBOX.
mail.inbox.name=INBOX


I must do it on the ROOT file?

thank you so much,
I really don't know how to go on...
thumbnail
Jerry Niu, modificado 15 Anos atrás.

RE: Mail Portlet in 5.1

Expert Postagens: 451 Data de Entrada: 21/06/06 Postagens Recentes
maristella bartolini:
I have configured my gmail account, and I can send mail, but I can't see them.


If you used the gmail account, your mails are directly pulled from Gmail and not stored on Liferay. It should be in your inbox or sent folder.
maristella bartolini, modificado 15 Anos atrás.

RE: Mail Portlet in 5.1

New Member Postagens: 8 Data de Entrada: 30/10/08 Postagens Recentes
This is the screen of my Mail Portlet

Mail Portlet

The errors are the same emoticon
thumbnail
Jerry Niu, modificado 15 Anos atrás.

RE: Mail Portlet in 5.1

Expert Postagens: 451 Data de Entrada: 21/06/06 Postagens Recentes
maristella bartolini:
The errors are the same


Looks like the folders are not getting pulled from gmail. If you have errors in your app server logs, post a ticket to LPS on support.liferay.com to report any defects.