This documentation relates to an early version of Confluence.
View this page in the current documentation or visit the current documentation home.

Setup a mail session in standalone version

All Versions
Click for all versions
Confluence 2.7 Documentation

Index

  1. Add the following to your web.xml file (insert it just before </web-app>):
    <resource-ref>
        <description>Test description</description>
        <res-ref-name>mail/Session</res-ref-name>
        <res-type>javax.mail.Session</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    
  2. Add the following to your server.xml file (anywhere inside the <context ...> tags)
    For Tomcat 5.0.x
    <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
        <parameter>
          <name>mail.smtp.host</name>
          <value>mail.example.com</value>
        </parameter>
        <parameter>
          <name>mail.smtp.port</name>
          <value>25</value>
        </parameter>
    </ResourceParams>
    
    For Tomcat 5.5.x
    <Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="mail.example.com" mail.smtp.port="25" />
    

    You only need to specify the mail.smtp.port parameter if you are using a non-standard port for SMTP.

  3. Restart the server. Go to create SMTP mail server screen. For JNDI location, enter:
         java:comp/env/mail/Session 
    

Labels

admin admin Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.