Configuring a Server for Outgoing Mail

Configuring your Confluence server to send email messages allows your Confluence users to:

You can personalise email notifications by configuring the 'From' field to include the name and email address of the Confluence user who made the change.

You need System Administrator permissions in order to configure Confluence's email server settings.

Configuring Confluence to send email messages

To configure Confluence to send outgoing mail:

  1. Choose the cog icon , then choose General Configuration under Confluence Administration
  2. Select Mail Servers under Configuration in the left-hand panel. This will list all currently configured SMTP servers.
  3. Click Add New SMTP Server (or edit an existing server).
  4. Edit the following fields as required:
    • Name: By default, this is simply 'SMTP Server'.
    • From Address: Enter the email address that will be displayed in the 'from' field for email messages originating from this server.
      This field is mandatory. You will not be able to complete the Confluence mail server configuration until this field has been specified.
    • From Name: Enter the name that will be displayed in the 'from' field for email messages originating from this server. This is the text which appears before the user's registered email address (in square brackets).
      This field accepts the following variables, which reference specific details defined in the relevant Confluence user's profile:




      The user's full name.


      The user's email address.


      The domain/host name component of the user's email address.

      The default is '${fullname} (Confluence)'.
      Hence, if Joe Bloggs made a change to a page he was watching and the Confluence site's 'From Address' was set to, then the 'From' field in his email notification would be: Joe Bloggs (Confluence) <>.

    • Subject Prefix: Enter some text to appear at the beginning of the subject line.
  5. Enter your Hostname, Port, User name and Password details.
    If your SMTP host uses the Transport Layer Security (TLS) protocol select Use TLS
    Specify the JNDI location of a mail session configured in your application server. For more information on how to set up a JNDI mail session, see Setting Up a Mail Session for the Confluence Distribution.

Testing the email settings

A Confluence administrator can test the email server as follows:

  1. Set up a mail server as described above.
  2. Click Send Test Email to check that the server is working. Check that you get the test email in your inbox.
  3. You can flush the email queue to send the email message immediately. Go to Mail Queue, and click Flush Mail Queue. See The Mail Queue.

A user can test that notifications are working as follows:

  1. Go to your user profile (using the Settings link) and edit your email preferences. See Email Notifications.
  2. Enable Notify On My Actions. (By default, Confluence does not send you notifications for your own changes.)
  3. Go to a page you wish to get notifications about.
  4. Choose Watch at the top-right of the page. See Watch Pages, Spaces and Blogs.
  5. Edit the page, make a change, and save the page.
  6. Check your email inbox. You may need to wait a while for the email message to arrive.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

61 Archived comments

  1. User avatar

    Alfred Nathaniel

    Mail sending does not work in standalone Confluence 2.6.0.  Tomcat 5.5.23 bundled with it is lacking org.apache.naming.factory.MailSessionFactory and a few other classes (see

     To fix it, owerwrite common/lib/naming-factory.jar with the version from Tomcat 5.5.25.

    08 Oct 2007
  2. User avatar


    I also can confirm that you need to replace the bundled common/lib/naming-factory.jar with the version from Tomcat 5.5.25

    I am using Confluence 2.7 running the bundled Apache Tomcat/5.5.23  (Confluence installer downloaded on 10th Jan 2008).

    This was an upgrade so I *knew* I had correctly configured the server.xml and web.xml files, and I had moved the 3 files as described in the instructions (in fact, I think javamail-1.3.2.jar  was missing from WEB-INF/lib in the 2.7 bundle) - I copied it over from my Confluence 2.5.1 install directory.

    I downloaded the Tomcat 5.5 zip (link below) to extract common/lib/naming-factory.jar and replace the bundled one in confluence-2.7-std/common/lib/

    16 Jan 2008
  3. User avatar

    Mark Rothfield

    How do you change the time of day and email subject line for the daily update email?

    28 Jul 2008
    1. User avatar

      Azwandi Aris [Atlassian]

      Hi Mark,

      Please ensure that you have a backup of every files that you are going to modify in the following steps.

      To change the time of day for the daily email report, please refer to a similar documentation at:

      The id of the bean, in this case should be dailyReportTrigger, instead of backupTrigger in the documentation.

      To change the email subject line to something else, please refer to the following page:

      The name of the parameter that you need to change is

      Remember to restart your Confluence in order for the changes to take effect. Hope this helps.


      28 Jul 2008
  4. User avatar


    How can we setup Confluence to send mail through an SMTP server that requires SSL for it's connection, such as Google Apps?



    11 Sep 2008
    1. User avatar

      Andy Brook [The Plugin People]

      You need to ensure your JRE CA certificate store has an entry that matches whoever provides your https:

      Try this example if it works you are done, if not, you will need to learn how to import the cert into your JRE/lib/security/cacerts file or create a truststore and setup your app server to override via , see for details. Oh, and the JRE cacerts file pass is 'changeit' so you can base a new truststore on an existing one (that one should save you a day (smile)) see somepageorother for suggested ports settings specific to google.

      11 Sep 2008
      1. User avatar



        Thank you for the examples and information, but we're interested in configuring Confluence, not writing a custom Java application to send mail.  Confluence mail setup  user interface provides fields for SMTP Host Name, Username, and Password.  There is no option on the page to tell Confluence to use SSL when connecting. 

        How do we get Confluence to use SSL?  In other places, such as retrieving mail, you can change the protocol (i.e, POPS instead of POP) but there is no such setting for outgoing mail.



        11 Sep 2008
        1. User avatar


          Any luck with this so far?

          I am currently trying to setup Confluence to use our corporate Google Apps to send it's mail. This however requires a connection to an smtps (TLS) connection.
          Is this supported and if so how do I proceed?



          06 Nov 2009
          1. User avatar

            Jack Low [Atlassian]

            Hi Sam & Erwin,
            Actually what Andy suggested was correct, despite he narrowed down the scope and focused on generating and importing the certificate (and some java code too (smile) ). To configure Confluence to send mail over SSL, you would need to use the a JNDI location for email instead of filling in the normal form, for example, in your server.xml, you can add the mail resource below:

            <Resource name="mail/GmailSmtpServer"

            This is what we call as JNDI. Next import the SMTP server certificate into a Java keystore. The process is described on the Connecting to SSL Services page.

            Lastly, you would also need to tell Tomcat where the keystore file is located by adding the following to bin/setenv.bat or

            export JAVA_OPTS="$HOME/.keystore"

            If you still encounter problem connecting to SMTP over SSL after that, please feel free to log a support request at

            Hope it helps.


            12 Nov 2009
    1. User avatar

      Jeremy Largman

      There's a Beta version of a Confluence SSL plugin  that facilitates this process.

      24 Feb 2012
  5. User avatar

    Brian Jones

    The javamail-x.x.x.jar is missing completely from our Confluence install directory.  (Confluence 2.9.1)

     If this .jar is required for the mail features to work properly:

    1)  Where can I download this?

    2)  Why is it not packaged with Confluence when installed?

    01 Oct 2008
    1. User avatar

      Ming Giet Chong

      Hi Brian,

      From Confluence 2.6.1 version onwards, the javamail-x.x.x.jar is omitted. That means you are only required to move the activation-x.x.x.jar and mail-x.x.x.jar files from the confluence/WEB-INF/lib directory to the common/lib directory and restart your Confluence.

      Hope this helps. Thanks.


      14 Oct 2008
  6. User avatar


    For 2.10.1, when defining a javamail session in server.xml, I have found that I need to put both the activation-x.x.x and mail-x.x.x jar in confluence-2.10.1-std/lib (top level) and only there, otherwise either

    1. tomcat won't find the right classes (if you only put them in either in WEB-INF/lib or in data/lib)

    or 2. the instance of session in Confluence and in Tomcat will end up being of differing classes (since the classes are from different classloaders) (if you copy them in the top-level lib and the data/lib directories)

    17 Jan 2009
  7. User avatar

    Steve Ilg

    When configuring the mail server can the From field have the more descriptive email address such as "John Doe []"


    29 Jan 2009
    1. User avatar

      Komathi Krishnan [Atlassian]

      Hi Steve,

      I am sorry that the From field does not accept special characters,however you can try using this way <John Doe> for more descriptive email address. Hope that helps.


      12 Feb 2009
      1. User avatar


        Hi Komathi,

        Is there a way to include the username while sending email notifications? If a user XYZ modifies a page,then can his username be shown in the email as similar to JIRA notifications?


        02 Sep 2009
        1. User avatar


          This would be terrific. At least give a 'reply-to' option.

          20 Jul 2012
      1. User avatar

        Matthias Oesterheld

        I think the correct format is John Doe<>

        08 Dec 2009
        1. User avatar



          Is it possible to make FROM field dynamic?. I want to put the confluence user email address who sends email.



          26 Jun 2010
          1. User avatar

            lukas trojcak

            18 Feb 2011
  8. User avatar

    Marten Vanderheiden

    Just a few questions about the Mail API settings.

    Mail API type/version:  ??? Is it just Java?
    Does your API have a retry queue? Yes/No (I believe I read that it does...just wanted to confirm)
    Does your application use DNS for MX resolution? Yes/No
    Do you meet RFC Standards compliance? RFC2821/RFC2822?

    11 Mar 2009
    1. User avatar

      arie murdianto


      Mail API type/version

      Yes, it is Java. The latest version of Confluence uses mail-1.4.1.jar.

      Does your API have a retry queue?

      Yes, there is a queue. If the sending process fails, then the task to send an email message will be queued in the mail queue and you can push the message in the queue.

      Does your application use DNS for MX resolution?

      As far as I'm concerned, it wont look up the records for mail exchange.

      Do you meet RFC Standards compliance?

      Confluence is not a SMTP server, it is only a client like Thunderbird or Outlook.

      19 Mar 2009
  9. User avatar


    If your mail server uses a secured socket simply add it's port number after the host name, as in:

    13 Dec 2009
  10. User avatar

    Edgardo Luzcando

    In my case, moving the recommended files worked in 3.1.1.  I run Confluence in an embedded Tomcat with RHEL5:

    mv /opt/confluence-3.1.1/confluence/WEB-INF/lib/activation-1.0.2.jar /usr/share/tomcat5/common/lib/activation-1.0.2.jar
    mv /opt/confluence-3.1.1/confluence/WEB-INF/lib/mail-1.4.1.jar /usr/share/tomcat5/common/lib/mail-1.4.1.jar

    I had originally deployed in the same version of Tomcat under a standalone Tomcat installation and this was not a problem, however the paths are different between the standalone Tomcat and the Red Hat Tomcat.  The problem comes from the Red Hat concatenation of jars in my case:

    Standalone Tomcat:

    eluzcand 12626     1 16 11:52 pts/2    00:00:03 /home/eluzcand/jdk1.6.0_16/bin/java -Djava.util.logging.config.file=/home/eluzcand/apache-tomcat-5.5.28/conf/ -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/home/eluzcand/apache-tomcat-5.5.28/common/endorsed -classpath /home/eluzcand/apache-tomcat-5.5.28/bin/bootstrap.jar -Dcatalina.base=/home/eluzcand/apache-tomcat-5.5.28 -Dcatalina.home=/home/eluzcand/apache-tomcat-5.5.28 org.apache.catalina.startup.Bootstrap start

    Red Hat Tomcat:

    tomcat   10014     1  3 10:38 ?        00:02:37 /usr/lib/jvm/java/bin/java -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -Dcatalina.ext.dirs=/usr/share/tomcat5/shared/lib:/usr/share/tomcat5/common/lib -Dcatalina.ext.dirs=/usr/share/tomcat5/shared/lib:/usr/share/tomcat5/common/lib -Djava.endorsed.dirs=/usr/share/tomcat5/common/endorsed -classpath /usr/lib/jvm/java/lib/tools.jar:/usr/share/tomcat5/bin/bootstrap.jar:/usr/share/tomcat5/bin/commons-logging-api.jar:/usr/share/java/mx4j/mx4j-impl.jar:/usr/share/java/mx4j/mx4j-jmx.jar -Dcatalina.base=/usr/share/tomcat5 -Dcatalina.home=/usr/share/tomcat5 org.apache.catalina.startup.Bootstrap start

    24 Mar 2010
  11. User avatar

    Todd Katz

    If you are just trying to use your Yahoo! mail account for outgoing mail from

    Confluence all I needed to do was use the following on the Edit SMTP Mail
    Server page:

    Name: SMTP Server

    From: insert your yahoo email address (

    Subject: [confluence] or whatever you want

    SMTP Host Address:

    User name: should match your Yahoo email address name (joe)

    Password: your Yahoo mail password


    18 Apr 2010
  12. User avatar


    smtp is fully working on the local server that has the tomcat + war distribution.

    When i use the admin console to send a test message (war only deployment to standard tomcat 5.5), I always get this:

    An error has occurred with sending the test email:
    com.atlassian.mail.MailException: javax.mail.NoSuchProviderException: smtp
        at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(

    The instructions for Standalone distribution:

    "Please move the above three jar files from the <Confluence-Install>/confluence/WEB-INF/lib directory to <confluence-install>/lib (for Confluence version 2.10 onwards) or <Confluence-Install>/common/lib (for earlier product versions) and restart Confluence."

    There are no instructions for war version, and I abhor hacking the global tomcat lib space for a particular webapp, as it may affect other webapps.

    However, to see if it worked, i moved activation-1.0.2.jar and mail-1.4.1.jar into the tomcat common/lib and restarted tomcat, but get the same error.

    If moving jars is an installation requirement for all versions, why is it not in the installation guide?

    24 Jun 2010
    1. User avatar


      I mean copied the jars..

      24 Jun 2010
      1. User avatar


        Hercules found the answer - you have to delete activation and mail jars from confluence/WEB-INF/lib dir, restart tomcat and it works. (war only distribution).  Looks like this distro is not designed to work with tomcat 5.5.

        24 Jun 2010
  13. User avatar


    Configuring just From Name with ${fullname}

    causes mails to be sent like "Name Surname ("

    This leads users to reply to the email hoping it will reach the user but actually this will go to the email configured with Confluence mail server.

    Even the From Address should be configurable or this issue should be resolved else keeping just from name configurable does not make sense.

    Bug report present here

    Thanks and Regards


    29 Jul 2011
  14. User avatar

    Michael Rieger

    I like the variable ${email} to be used for "From Name". I like it so much, I like to be able to use it for "From Address". This is to make sure that notification recipient can reply directly to the modifier of the page (rather than replying to some standard email address configured as "From Address").

    Cf. the following improvement:

    30 Sep 2011
    1. User avatar


      We also really would like to be able to do this. The one from Michael was Dupped.

      Please vote for it

      04 Jan 2012
    1. User avatar

      Rick Taft

      What's needed actually is a Reply-To: field.

      27 Mar 2012
  15. User avatar

    Tom Winter

    Just in case...(wink)

    Has anyone tried to get confluence outgoing email working with Microsoft Online Services? I'm guessing it's similar to using Gmail. I know nothing about Java, etc., so this rather intimidating to me.

    13 Jan 2012
    1. User avatar

      Tom Winter

      To start, I found this page: Connect to the Microsoft Online Services SMTP Server. It requires TLS. Not sure what to do about that.

      13 Jan 2012
  16. User avatar


    did you manage to get this working Tom?

    29 Sep 2012
    1. User avatar


      I got lucky and didn't have to go this route. We ended up installing the SMTP service on another Windows server and set the SMTP service to relay to our MS Online stuff (not sure how exactly, our network person did it). Then we set Confluence to go through that internal SMTP server. Since we controlled the internal SMTP server we made it so it didn't need fancy authentication. The SMTP server (I believe) does have options for that so it could go to MS Online. Kind of hacky and it seems silly to need another server/service to do it, but it does work.

      01 Oct 2012
      1. User avatar

        Tom Winter

        Sorry, I didn't login before I posted that. (wink)

        01 Oct 2012
  17. User avatar


    hi all

    i got the problem that received mail, which some send me from confluence try share a page with me, be displayed on mobile devices only after long loading. this happens by reason of css-file. this is reference to our intern domain an so the device cant (unless it's connected to VPN) access it.

    is it possible to embed the css-file into html? or is it possible to make only css file accessible from outside??

    an alternative would be to give up HTML and change to text messages.

    thanks for all answers!




    01 Nov 2012
  18. User avatar

    John Rehill

    Is there anyway to set the From Address to use the logged in user?

    For instance, user A is watching a page.

    User B makes a change, so User A gets notified. However while the From User states it as User B, the actual email address used was the default one set in STMP setup, hence reply to this goes to the IT department.

    Can I just use ${email} in From Address too?

    14 Dec 2012
    1. User avatar

      Ethan Foulkes

      John Rehill,

      Did you figure this out? I think I'm in the same boat as you and would like to stop explaining to the users to use forward instead of reply...

      15 Mar 2013
      1. User avatar

        Klaus Azesberger

        I very much would like to know the solution to this too. it seems the ${email} does not work in the SMTP Setup

        08 Jul 2015
        1. User avatar

          Giles Brunning [Atlassian Technical Writer]

          Hi All,

          It looks like you can only use the {email} variable in the From Name field, unfortunately. Feel free to make an improvement suggestion so we can gauge the interest.

          19 Jul 2015
  19. User avatar


    any one help how to configure email for jira. complete steps pls 


    21 Dec 2012
    1. User avatar

      Sarah Maddox [Atlassian]

      Hallo there

      Here is the JIRA documentation on setting up an email server: Configuring JIRA's SMTP Mail Server to Send Notifications

      Cheers, Sarah

      23 Dec 2012
  20. User avatar

    Webqem Support

    In option 5. Manually enter your Host Address, User Name and Password details (recommended)


    We are seeing that it wont accept a blank username and password option here and will put in the current admin user's details. Is there a way to make it use just an IP? Our smtp servers are set up to relay only based on IP currently.

    12 Apr 2013
  21. User avatar


    hello, I get an error while trying to send a test mail because I have no username and password.
    It is right for me because the exchange 2010 server internalrealy allow confluence IP to relay without any authentication.

    But confluence won't understand and it needs a user name and password.


    How can I work-around over it? 

    24 Apr 2013
  22. User avatar

    Denise Unterwurzacher [Atlassian]

    Hi there. I think you might be hitting this bug:  CONF-29000 - If mail.smtp.auth is ever set to true in a mail server config, it is never set to false again when usernames and passwords are removed. Resolved

    If a username and password are ever saved in those fields, it sets a value to true which then requires authentication, however when the username and password are cleared, it still requires auth. You can workaround it by deleting the mail server config and starting again, making sure that no username and password are ever saved. 

    If that doesn't fix it, you can create a ticket at and the Support team will help you out.

    25 Apr 2013
  23. User avatar


    when I used confluence 5.1.x, I moved activation-1.0.2.jar and mail-1.4.5.jar into CONFLUENCEPATH/lib. and added resource info into server.xml.

    But I upgraded 5.1.x into the lastest 5.2, there isn't activation-1.0.2.jar in confluence/WEB-INF/lib. Where could I find it?

    27 Aug 2013
  24. User avatar

    Burke Mamlin

    Confluence allows for multiple Mail Servers to be defined, but there isn't a way to sort them or define a default server.  How does Confluence decide which one to use?  If you have more than one mail server defined, what determines which is used & when?  Does Confluence just try them all in alphabetical or date-defined order until one works?  

    12 Sep 2013
  25. User avatar

    Matthew Weston

    In confluence 5.3 the activation-x.x.x.jar does not exist? Clearly these instructions are slightly out of date given the mail jar is version 1.4.5 in the latest release... Can you confirm if the above is still applicable in the latest version?

    03 Oct 2013
    1. User avatar

      Charles Miller [Atlassian]

      The Java Activation Framework is now included with the JDK and does not need to be bundled in Confluence. I'll update the documentation to remove the reference.

      07 Oct 2013
  26. User avatar

    Hans-Peter Geier

    in Confluence 5.4.3, when trying to send test email, I'm getting this error message:

    An error has occurred with sending the test email. If your mail server requires authentication, please ensure that TLS or SSL is enabled on your server for the specific maibox  (etc)

    com.atlassian.mail.MailExeption: javax.mail.AuthenticationFailedException: No authentication Mechanisms supported by both server and client


    I have a test instance of Confluence 4.3.7 on the same server and the same configuration (as far as of this configuration screen). No such problem there.

    21 Feb 2014
    1. User avatar


      Found a solution to this. We had the same error with our instance for 5.5.2, but we created a relay from our server that hosts Confluence to our Exchange Server. When the relay was removed, we were able to send the test e-mail. You do need to set up the user account on the Exchange Server for access and create a mail box on the Exchange server for that user account.

      I hope this helps. 

      16 Oct 2014
  27. User avatar

    Hans-Peter Geier

    does Confluence 5.x provide the ability to respond to a notification, which should result in creation of a comment ?


    21 Feb 2014
  28. User avatar

    Sunny Lakhiyan



    Any way to turn this off completely so no emails are sent in ondemand? or to limit it per page. Say for example you have a page with sensitive info and when you make a change it is transmitted insecurely over emails? We are using ondemand.




    03 Mar 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Hi Sunny,  you would need system administrator to make changes to the mail and notifications settings. Contact support , they may be able to disable notifications in your instance. 

      03 Mar 2014
  29. User avatar


    This is what we call as JNDI. Next import the SMTP server certificate into a Java keystore. The process is described on the Connecting to SSL Services page.

    Hello how can i get the server certificate? if i use Examine SSL/TLS Connection in portecle, i always get the error:

                   Connection refused: connect

    I have the following ressource in my server.xml:

    <Resource name="mail/GmailSmtpServer"

    and i confluence admin/mail server/JNDI Interface:java:comp/env/mail/GmailSmtpServer.

    I also tested it with Port 465. But it doesn't work. Perhaps i must add the SSL certificate to the cacert keystore, but i always get the error. What do i wrong? regards Selcuk

    28 May 2014
  30. User avatar

    Prashant Kumar

    Can you answer this?


    Confluence allows for multiple Mail Servers to be defined, but there isn't a way to sort them or define a default server.  How does Confluence decide which one to use?  If you have more than one mail server defined, what determines which is used & when?  Does Confluence just try them all in alphabetical or date-defined order until one works?  

    30 May 2014
  31. User avatar

    Nguyen Viet Tuan

    My configuration seems not working, each time Confluence tries to send email using Gmail, we meet this exception and cannot continue:

    Configuration information is as follow:



    Use TLS: yes

    Any ideas?




    07 Jan 2015
    1. User avatar

      Denise Unterwurzacher [Atlassian]

      Hi there! Try using 587 for the port, that tends to be required for GMail. Also, depending on what version of Confluence you use there are different ways you need to set up GMail as a mail server. Have a look at this doc for all the steps: How do I configure Confluence to use Gmail as the mail server?

      08 Jan 2015
      1. User avatar

        Nguyen Viet Tuan

        Hi, thank you for your support. It works, with 587.

        08 Jan 2015
Powered by Confluence and Scroll Viewport