cancel
Showing results for 
Search instead for 
Did you mean: 

Nuxeo Connexion to SMTP Google Mail - GMail

snarf77_
Confirmed Champ
Confirmed Champ

Hi all,

This post is a copy/paste of a community forum question I posted as I don't know the better place to ask. Sorry for double posting if this is raising problems to anyone.

I juste gave a new try to Nuxeo 5.5 using a fresh install on ubuntu server LTS and I'm not succeeding in configurating mail service (we use GoogleMail). I have seen a lot of related post and according to them my configuration seems to be correct (at least to me...):

nuxeo.notification.eMailSubjectPrefix="[Nuxeo]"
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.usetls=true
mail.smtp.auth=true
mail.smtp.username=myuser@mycompany.com
mail.smtp.password=myuserpassword
mail.from=myuser@mycompany.com
mailservice.user=myuser@mycompany.com
mailservice.password=myuserpassword
mail.store.protocol=imap
mail.transport.protocol=smtp
mail.user=myuser@mycompany.com
mail.debug=true

Note: I have used this configuration on a mail client so I'm sure the credentials and settings are correct.

When I try to send an email notification (I use the email feature on one document to test it) I got the following warning in the /var/log/nuxeo/console.log (Is there somewhere else to check for logs (I have nothing in mail.log, syslog or any other nuxeo.log) (I have activated the mail.debug = true option)

2011-12-20 11:49:54,252 WARN [org.nuxeo.ecm.platform.ec.notification.NotificationEventLis tener] Failed to send notification email to 'recipient@company.com': javax.mail.AuthenticationFailedException: null

It seems to be a warning only but the e mail is never delivered.

Could this be an email settings problem or a java problem or whatsoever ? I really don't know how to troubleshoot this

Many thanks in advance

Snarf

9 REPLIES 9

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

In my case that works I have this configuration:

mail.from=no-reply@nuxeo.com
#mail.smtp.usetls=false
mail.smtp.usetls=true
#mail.smtp.host=localhost
mail.smtp.host=smtp.gmail.com
#mail.smtp.port=25
mail.smtp.port=587
#mail.smtp.username=anonymous
mail.smtp.username=bjalon@nuxeo.com
#mail.smtp.auth=false
mail.smtp.auth=true
#mail.smtp.password=password
mail.smtp.password= ... 
#mail.debug=false
mail.debug=true

I test it on 5.4.2, 5.5 and it works.

About the password, I had a problem that must be fixed since 5.4.3: https://jira.nuxeo.com/browse/NXBT-311

But maybe you have other special character not well escaped. If this is the case you can create a ticket into our JIRA.

[Edit] bug is still here so that may be your problem... So to escape & you must replace it into your nuxeo.conf by that

&

You can follow the bug here: https://jira.nuxeo.com/browse/NXP-5470

Once, I had a trouble like you since I change my password.

I see here to use this url:

https://www.google.com/accounts/DisplayUnlockCaptcha

Maybe it will work for you.


If you continue to have trouble maybe you can look into your logs sometimes messages are explicit. I let you looking this answer:

http://answers.nuxeo.com/questions/950/mail-debug-option

logs are into $NUXEO/log/server.log

For developers, I just want to explain that we are using the standard java mail library and you can look into our code that mail sends is made like that:

InitialContext ic = new InitialContext();
javax.mail.Session session = getSession();
(Session) ic.lookup("java:comp/env/Mail");

MimeMessage msg = new MimeMessage(session);

msg.setFrom(new InternetAddress(session.getProperty("mail.from")));
Object to = "bjalon@nuxeo.com";
msg.setRecipients(javax.mail.Message.RecipientType.TO,
        InternetAddress.parse((String) to, false));

... Build your message ...
javax.mail.Transport.send(msg);

snarf77_
Confirmed Champ
Confirmed Champ

Many thanks for answering.

Unfortunately I have no "&" character in the username I supplied. [edit] nor password [/edit]

I have a dash (-) in the e mail of the nuxeo user I want to send the email but I don't think this could be an issue.

I have a moment ago seen some post related to "external mail user" so I must say that the username used for authenticate against gmail is not a user declared in nuxeo (but the e mail recipient is of course a nuxeo user). Could this be a cause ?

At last, can anyone help me to understand the ajax fault and how to investigate that ?

Thank you

Snarf

No there is no link between the Nuxeo users and the external mail user.

for ajax fault create another question...

snarf77_
Confirmed Champ
Confirmed Champ

I finally succeed in making it work if I use a credential like user@gmail.com. Using user@mycompany.com (with mycompany using gmail server for email service) it failed each time.

bjalon: Do you use bjalon@nuxeo.com as user to authenticate or is it only for the example ? as it seems for me to be the main root cause. it seems I will have to create a fake googlemail account just for nuxeo server to authenticate in my case.

Is there some known issues related to entreprise googlemail service against classical gmail account ?

Thank you

Snarf

Yes I test with my company mail account.

Yes I did that and the password can't be more simple ...

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

I had a trouble like you since I change my password.

I see here to use this url:

https://www.google.com/accounts/DisplayUnlockCaptcha

Maybe it will work for you.

I tried all the ways mentioned above but still cannot make it work to send out email notification.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.