Documentation for JIRA 4.4. Documentation for other versions of JIRA is available too.
This page describes how to use Gmail for both SMTP and POP3 mail.
Follow the instructions from Configuring JIRA to Send SMTP Mail:
Move( not copy! ) the activation and mail jar files from the /WEB-INF/lib folder to the /common/lib (Tomcat 5.5) or /lib (Tomcat 6) folder. For example:
mv <JIRA-INSTALL>/WEB-INF/lib/activation-1.1.1.jar lib/; mv <JIRA-INSTALL>/WEB-INF/lib/mail-1.4.1.jar lib/
Add Gmail as a JNDI Resource in /conf/server.xml in-between JIRA's <Context>...</Context> ( after line 49 ). Change your username and password:
<Resource name="mail/GmailSmtpServer" auth="Container" type="javax.mail.Session" mail.smtp.host="smtp.gmail.com" mail.smtp.port="465" mail.smtp.auth="true" mail.smtp.user="myusername@gmail.com" password="mypassword" mail.smtp.starttls.enable="true" mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory" />
If you are not using the built in cacerts file, you'll need to add gmail as a secure server (most default setups can skip this step).
Restart JIRA so that the above changes are picked up by JIRA. Then, configure the SMTP server in JIRA's interface, use the JNDI setting. The proper value (if using the default example), is:
java:comp/env/mail/GmailSmtpServer
To use Gmail, for example, as a create and comment mail handler: