Configure Confluence to Use GMail as the Mail Server

Hi!

We're trying to setup Confluence (5.2) to use Gmail as our default mail server (SMTP). We actually followed these instructions

The fact is that we didn't move any file (the mail-1.4.5.jar is inside the Confluence WEB-INF/lib directory), and we believe that the configuration file we modified is ok.

When we try to test our Mail configuration inside Confluence we are receiving this error: ERR_CONTENT_DECODING_FAILED ((http://ourserver/admin/mail/dosendtestemail.action) and nothing is written in the logfiles.

Take a look at our "server.xml":

<Engine name="Standalone" defaultHost="localhost" debug="0">

            <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false">

                <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
                    <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluenc
e/WEB-INF/classes/log4j.properties -->
<Manager pathname="" />
<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="our_account@googleAppsDomain.com"
		    password="ourPassword"
		    mail.smtp.starttls.enable="true"
		    mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"/>

                </Context>
            </Host>

        </Engine>

By the way, if we change the JNDI location inside Confluence or in the "server.xml" Confluence reply that can't find it, so seems it's well defined.

So, what can we do? We don't know what's going on.

Cheers,

3 answers

1 accepted

This widget could not be displayed.

You may find the link below useful.

https://confluence.atlassian.com/pages/viewpage.action?pageId=42795030

I would like to stress that you must Move the files explained in the link to <Confluence installation dir>/lib as the first step of configuring mail.

Thank you Hossein!

Didn't pay attention to the specific folders!

It worked! Only moving a single file.

Thanks!

This widget could not be displayed.

Start by adding mail.debug="true" to the resource, and see what gives.

Also you may want to check Google docs for app admins to see if this nugget is true

"Also, if you find errors using the port 465 please change it to 587. Gmail is blocking port 465 on some networks to avoid spamming"

This widget could not be displayed.

Hi Eddie.

We tried to enable the debug for this purpose, but we didn't get anything new in the log files (catalina.out, etc).

Yes, I know that can be a problem of spamming, but first of all I'd like to know why we aren't obtaining something in the log input type (and in the logfile) and instead we receive an error directly when we are trying to "Send a test email".

Don't know what's happening...

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

406 views 4 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you