This page last changed on Feb 01, 2011 by gnedel.

To configure Confluence to use Gmail to send emails, you will need to create a JNDI mail session and then have Confluence use it as per this document.

Please see Setting Up a Mail Session in Confluence Standalone for some guidelines.

  1. Move activation-1.0.2.jar and mail-1.4.1.jar from /confluence/WEB-INF/lib to <tomcat-install>/common/lib (Tomcat 5.5) or <tomcat-install>/lib (Tomcat 6).
  2. Paste the following code in confluence.xml or server.xml located at <confluence-home>/conf, inside the <Context> node (substitute username and password):
    Tomcat 5.5 or Tomcat 6
    <Resource name="mail/Session"
        auth="Container"
        type="javax.mail.Session"
        mail.smtp.host="smtp.gmail.com"
        mail.smtp.port="465"
        mail.smtp.auth="true"
        mail.smtp.user="nobody@gmail.com"
        password="foobar"
        mail.smtp.starttls.enable="true"
        mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
      />
  3. Please restart your Confluence instance.
  4. Add java:comp/env/mail/Session to your JNDI mail configuration from Administration > Mail Servers.

Note: You may optionally add mail.debug="true" into the <Resource> to see logs generated by JavaMail.

Document generated by Confluence on Mar 16, 2011 18:50