Difference between revisions of "Tomcat mail configuration"

From OpenKM Documentation
Jump to: navigation, search
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
OpenKM is a J2EE application deployed in Tomcat. Some parameters have a default configuration that fit common user requirements but others depend on specific user configuration.
 +
 +
OpenKM sometimes sends emails to users (because they have subscribed to a document or folder, for example) and you have to check that this email configuration is correct. If you edit the file ''$TOMCAT_HOME/conf/server.xml'':
 +
 +
$ vim $TOMCAT_HOME/conf/server.xml
 +
 +
{{Warning|After make any change in file server.xml is mandatory restart application, otherside the changes are not applied}}
 +
 +
You will see something like this:
  
 
<source lang="xml">
 
<source lang="xml">
<Resource
+
<Resource name="mail/OpenKM" type="javax.mail.Session"
name="mail/Session"
+
    mail.transport.protocol="smtp"
type="javax.mail.Session"
+
    mail.smtp.auth="true"
auth="Container"
+
    mail.smtp.host="your smtp server"
mail.smtp.host="mydomain IP address"
+
    mail.smtp.user="<username>"
mail.smtp.auth="true"
+
    password="<password>"
username="my email account username"
+
    mail.port="25"
password="the email account password"
+
    mail.debug="true"/>
mail.user="my email account username"
 
mail.password="the email account password"
 
mail.port="25"
 
mail.transport.protocol="smtp"
 
mail.debug="true"/>
 
 
</source>
 
</source>
 +
 +
{{Note|Optionally, you can use '''mail.user<nowiki>="<username>"</nowiki>''' and '''mail.password<nowiki>="<password>"</nowiki>''' parameters}}
 +
 +
== Gmail example ==
 +
<source lang="xml">
 +
<Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
 +
    mail.transport.protocol="smtp"
 +
    mail.smtp.auth="true"
 +
    mail.smtp.host="smtp.gmail.com"
 +
    mail.smtp.port="465"
 +
    mail.smtp.user="<username>"
 +
    password="<password>"
 +
    mail.smtp.from="<sender email>"
 +
    mail.smtp.quitwait="false"
 +
    mail.smtp.starttls.enable="true"
 +
    mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
 +
    mail.debug="true"/>
 +
</source>
 +
 +
{{Note|Use the parameter '''mail.smtp.quitwait<nowiki>="false"</nowiki>''' if you get problems during tomcat startup }}
  
 
[[Category: Installation Guide]]
 
[[Category: Installation Guide]]

Latest revision as of 16:12, 28 September 2013

OpenKM is a J2EE application deployed in Tomcat. Some parameters have a default configuration that fit common user requirements but others depend on specific user configuration.

OpenKM sometimes sends emails to users (because they have subscribed to a document or folder, for example) and you have to check that this email configuration is correct. If you edit the file $TOMCAT_HOME/conf/server.xml:

$ vim $TOMCAT_HOME/conf/server.xml

Nota advertencia.png After make any change in file server.xml is mandatory restart application, otherside the changes are not applied

You will see something like this:

<Resource name="mail/OpenKM" type="javax.mail.Session"
    mail.transport.protocol="smtp"
    mail.smtp.auth="true"
    mail.smtp.host="your smtp server"
    mail.smtp.user="<username>"
    password="<password>"
    mail.port="25"
    mail.debug="true"/>

Nota clasica.png Optionally, you can use mail.user="<username>" and mail.password="<password>" parameters

Gmail example

<Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
    mail.transport.protocol="smtp"
    mail.smtp.auth="true"
    mail.smtp.host="smtp.gmail.com"
    mail.smtp.port="465"
    mail.smtp.user="<username>"
    password="<password>"
    mail.smtp.from="<sender email>"
    mail.smtp.quitwait="false"
    mail.smtp.starttls.enable="true"
    mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
    mail.debug="true"/>

Nota clasica.png Use the parameter mail.smtp.quitwait="false" if you get problems during tomcat startup