We have seen how you can configure JIRA to send e-mails to notify users of updates on their issues. But this is only half of the story when it comes to JIRA's e-mail support.
You can also set up JIRA for it to periodically poll mailboxes for e-mails and create issues based on the e-mails' subject and content. This is a very powerful feature with the following benefits:
For JIRA to retrieve e-mails and create issues from them, you need to add the POP/IMAP mail server configurations to JIRA. POP and IMAP are mail protocols used to retrieve e-mails from the server. E-mail clients, such as Microsoft Outlook and Mozilla Thunderbird, can use one of these protocols to retrieve your e-mails.
Unlike outgoing mail servers, JIRA allows you to add multiple incoming mail servers. This is because while you only need one mail server to send e-mails, you might have multiple mail servers or multiple mail accounts (on the same server) that people will use to send e-mails to. For example, you might have one dedicated to support and another one for sales. It is usually a good idea to create separate mail accounts to make it easier when trying to work out which e-mail should go into which project. For this reason, adding POP/IMAP mail servers can be thought of as adding multiple mail accounts in JIRA:
Perform the following steps to add an incoming mail server:
You can repeat this and add additional POP/IMAP mail servers.
Mail handlers are what JIRA uses to process retrieved e-mails. Each mail handler is able to process e-mails from one incoming mail server, and periodically scan for new e-mails.
JIRA ships with a number of mail handlers, each with their own features. In the following sections, we will discuss each of the handlers in detail.
Creating a new issue or adding a comment to an existing issue mail handler (also known as the Create or Comment Handler in previous version of JIRA), is the most used mail handler. It will create new issues from the received e-mails and also add comments to existing issues if the incoming e-mail's subject contains a matching issue key. If the subject does not contain a matching issue key, a new issue is created:
Parameter |
Description |
---|---|
Project |
The project in which issues will be created. This is not used for commenting where the e-mail subject will contain the issue key. |
Issue Type |
The issue type for newly created issues. |
Strip Quotes |
If present in the parameters, quoted text from the e-mail will not be added as a part of the comment. |
Catch Email Address |
Specifies if JIRA is to only handle e-mails that are sent to the specified address. |
Bulk |
This specifies how to handle auto-generated e-mails, such as those generated by JIRA. It is possible to create a loop, if JIRA sends e-mails to the same mailbox where it also picks up e-mails. In order to prevent this, you can specify to either of the following:
|
Forward Email |
If specified, then if the mail handler is unable to process an e-mail message it receives, an e-mail message indicating this problem will be forwarded to the e-mail address specified in this field. |
Create Users |
If the e-mail is sent from an unknown address, JIRA will create a new user based on the e-mail "from" address and randomly generate a password. An e-mail will be sent to the "from" address informing the new JIRA account. |
Default Reporter |
Specifies the username of a default reporter, which will be used if the e-mail address in the From: field of any received messages does not match the address associated with that of an existing JIRA user. |
Notify Users |
Uncheck this option if you do not want JIRA to notify new users created as per the Create Users parameter. |
CC Assignee |
JIRA will assign the issue to the user specified in the To field first. If no user can be matched from the To field, JIRA will then try the users in the CC and then BCC list. |
CC Watchers |
JIRA will add users in the CC list (if they exist) as watchers of the issue. |
This mail handler extracts text from an e-mail's content and adds it to the issue with a matching issue key in the subject. The author of the comment is taken from the From field.
It has a similar set of parameters to the Create and Comment handler.
Adding a comment from the non-quoted e-mail body is very similar to the Full Comment Handler, but only extracts non-quoted texts and adds them as comments. Texts that start with ">
" or "|
" are considered to be quoted.
It has a similar set of parameters to the Create and Comment handler.
Creating a new issue from each e-mail message is very similar to the Create and Comment handler except this will always create a new issue for every received e-mail.
It has a similar set of parameters to the Create and Comment handler.
Adding a comment before a specified marker or separator in the e-mail body is a more powerful version of the comment handlers. It uses regular expressions to extract texts from e-mail contents and add them to the issue:
You can set up as many mail handlers as you want. It is recommended that you create dedicated mailboxes for each project you wish to allow JIRA to create issues from e-mails. For each account, you will then need to create a mail handler. The mailbox you set up needs to be accessible via POP or IMAP.
Perform the following steps to add a mail handler:
Depending on the handler type you have selected, the next screen will vary. On the next screen, you will need to provide the required parameters for the mail handler, as described in the preceding section. The following screenshot shows an example configuration dialog box, where new issues will be created in the Demonstration project as Bugs:
You can update the details of your mail handlers at any time. You would often need to tune your handler parameters a few times until you get your desired results. Perform the following steps to update a mail handler:
Once updated, the changes will be applied immediately and JIRA will use the new handler parameters for the next polling run.
You can also delete mail handlers that are no longer required at any time.