Issue/Comment Creation from Email
| 
PDF |
JIRA can be configured to automatically create issues or comments based on incoming emails. This is especially useful in a
helpdesk or support scenario, where users send support queries via email, which you wish to track with JIRA.
Subsequent emails about the issue, for example responses to Email Notifications,
can be automatically recorded as comments.
To set up issue and comment creation via email, you will need to create a mail account on your server (usually for each
project). For example, for the 'ABC' project, you might establish an account abc-issues@yourcompany.com.
This mail box should be accessible via POP, IMAP, or on the local filesystem. JIRA will periodically scan this
mail box, and appropriately create issues or comments for any emails it finds, and (optionally) new user accounts for senders not previously
seen.
Once you have established a mail account, here is how to configure JIRA to periodically scan it (POP access assumed):
- Login as a user with global administrator access.
-
Bring up the administration page by clicking either on the "Administration" link on the top bar or the title of the
Administration box on the dashboard:


-
On the panel on the left, under the title "Global Settings", click on the link labelled "Mail Servers".
-
Click on the "Configure new POP mail server" link.
-
This will bring up the "Add POP Mail Server" page.
Fill in as follows:
-
Name: put a short descriptive name, possibly just the email address that will be collected by this
service
-
Description: put a short phrase that describes this service, probably 'Email Issue Creation/Comments for <Project>'.
-
Hostname: put the name of your POP server
-
Username and Password use the email account details as created in step 1.
-
This should bring you back to the Email Servers page, where you should see a new POP server listed. You can edit
and delete this server here.
-
On the panel on the left, under the title "System", click on the link labelled "Services".
-
This will bring up the "Services" page. It lists the current services running on this system. On a vanilla
system there should be one service running - Mail Queue Service. You cannot delete the Mail Queue Service.
Additionally, if you have enabled the option to automatically backup JIRA's data, you will also see the Backup
Service listed here too.
-
Fill in the "Add Service" form as follows:
For Name enter a descriptive name, eg "Create Issue/Comment Service for <Project>".
For Class, select the appropriate option presented in the drop down list, or enter
com.atlassian.jira.service.services.pop.PopService, and the Delay is best
left as 1 minute. Click Add Service.
-
This will bring up the "Edit Service" screen to configure the service.
For Handler, select "Create Or Comment Handler"
from the drop down box. Set Handler parameters to something like: project=JRA, issuetype=1, catchemail=foo@atlassian.com
Further details on the handler parameters are available here.
The Forward Email parameter specifies an email address to which error notifications can be forwarded.
Any failures encountered in this process are logged and forwarded in an email to this address.
It is also possible to specify whether SSL is used or not.
Click the "update" button and the service will be in effect.
JIRA examines the email subject and the in-reply-to message for an existing issue reference
to determine whether a new issue or comment should be created. A new issue is created if an existing issue reference
is not found - otherwise, a comment is added to the issue referenced in the email. The email to foo@atlassian.com will be processed as follows:
- Issue Creation:
- The subject of the email will become the issue summary
- The body of the email will be the issue description
- A bug (since issue type has been set to 1 in this example) will now be created for project "JRA" with the above
information
- Comment Creation:
- The body of the email will become a comment on the issue
Note
The Subject of the email becomes the issue summary. As all issues require a summary, each
email intended for issue creation should include a Subject.
project parameter is the project key.
These are the numbers associated with the default issue types:
-
Bug: issuetype=1
-
New Feature: issuetype=2
-
Task: issuetype=3
-
Improvement: issuetype=4
-
Sub-task: issuetype=5
The catchemail handler parameter is, if present, used to filter the email sent to
issues@example.com. In this example, only email sent to (or Cc'ed or Bcc'ed to) foo@atlassian.com will be
processed by the system.
You can only specify one catch email address and one issue type.
Additionally, you may add a reporterusername, createusers and
ccassignee handler
parameters:
-
reporterusername
- At the moment, JIRA will reject any emails sent to issues@example.com from persons who do not
exist as valid users in JIRA. To allow anonymous users to create issues via email, you can create an anonymous
user or dummy account on JIRA and set the reporterusername to point to this account. When the
"reporterusername" option is specified, the "from" address of the email is added at the end of the comment of
the issue.
-
createusers
- If createusers is set to true, people who don't currently have an account in JIRA will
have it created for them. In JIRA Enterprise, this allows the creator to be notified of subsequent updates
to the issue, by configuring the notification scheme to notify the 'Reporter' of updates.
-
ccassignee
- If an email has a Cc address listing a user already present in JIRA, by default JIRA will
assign the issue to that user. In JIRA 3.1 and above, if you do not want this behaviour,
set ccassignee to false.
E.g. Create a user called "anonymous" and set reporterusername=anonymous.