The javax.mail component is not correctly configured on tomcat distributions.
To have it configured through JNDI you need to:
1. declare the mail resource in nuxeo.xml (see templates/default/conf/Catalina/localhost)
<Resource auth="Container" name="Mail" type="javax.mail.Session"
mail.smtp.host="localhost" ...other_mail_attributes_here... />
This will bind a configured javax.mail.Session in JNDI under the name java:comp/env/Mail
2. On Java 5 move mail.jar and activation.jar from nxserver/lib to tomcat lib.
On Java 6 you only need to move mail.jar to tomcat lib.
3. Change the mail configuration used by notification service in nxserver/config/notification-config.xml:
<mailSessionJndiName>java:comp/env/Mail</mailSessionJndiName>
4. change or add the JNDI name used by SendMail operation in nuxeo.properties:
jndi.java.mail=java:comp/env/Mail
Also I think we need to modify notification service to use the nuxeo property for the JNDI name to be able to share it between different services that need a mail session.
- is duplicated by
-
NXP-5550 Notification is not working on tomcat because of missing mail configuration
- Resolved