Incoming emails overview
Used for processing incoming mails, Create or Edit Jira issues with them.
Mail handlers process downloaded (fetched) emails from the inboxes configured under mail accounts. Every mail handler is linked to a mail account and defines the actions that should be executed when an incoming email is processed.
Incoming mail accounts
Incoming mail accounts are mailboxes from which Email This Issue can download and process emails.
Note: Incoming mail accounts must be accessible via IMAP4 or POP3 protocols and must support encryption methods like SSL and TLS.
For more information, see Incoming mail connections.
Mail handlers
Mail handlers are the components responsible for processing the downloaded emails, creating issues and comments, and for executing the actions configured in them. Email This Issue for Jira Cloud comes with a few different predefined mail handler types. All handlers can be fully and flexibly customized.
Rules and actions in the mail handler allow you to do various things with an issue depending email content or issue fields, for example:
Save email recipients and senders in custom field or as Request Participants
Execute workflow transitions on the issues
Send auto-reply emails
Update issue fields
Create customers
Approve or Decline Service Management requests
Generally we advise that there should be only one mail handler per incoming mail connection in order to avoid errors, however, in special cases you might have many handlers working on one incoming mail connection if you want to use Accept filters for processing emails based on what the recipient email address is.
In this case, the logic of the process is the following:
We create an Incoming Queue Item from the incoming email
All enabled mail handlers that are connected to the incoming connection are checked one-by-one
The first one in line starts processing the email by checking the REJECT filters. If email is caught by a reject filter in any of the mail handlers, it will stop processing with a SKIPPED status.
If no reject filters are applicable, we proceed to check the ACCEPT filters one by one - here if the accept filter accepts the email, it will start processing the email based on the Rules and Actions resulting in a SUCCEEDED or ERROR status.
If no accept filters accept the incoming email, then it is returned with a FILTERED_OUT status.
Mail handler operation
The mail handler checks Accept email. This can be used to filter messages in a mailbox if it has multiple email addresses (like mail aliases). By default, all messages are passed through, regardless of the recipient addresses.
If Accept email is set to if any recipient equals to any of the following addresses, then the email is processed if To/CC/BCC address equals to any of the specified email addresses.
If Accept email is set to if any recipient matches any of the following regular expressions then email is processed if To/CC/BCC address matches to any of the specified regular expressions
Various filters are applied to accept or reject the incoming message from further processing. Learn more about this here: Filtering.
The mail handler tries to find the corresponding issue. Learn more about the applied strategy here: Issue lookups.
The mail handler searches for the user on whose behalf the actions will be executed, using the From address in the email:
If the user is found, then they will be used as the Reporter for creating issues, the Author for adding comments, the user who executes transitions, and so on. For any action that cannot be performed using the sender user's permissions, the Default reporter will be used if one is set and fallback to default reporter is enabled.
If the user is not found, but Default reporter is set in the Mail Handler and fallback to the default reporter is enabled, the Default reporter will be used.
If the user is not found and Default reporter is not set or fallback is not enabled, execution is aborted.
Actions are processed. Learn more about it here: Setting up rules and actions in the actions editor.
If an issue was found, it will be remembered, and some actions can use the issue such as Add comment, Execute transition, Send auto reply, and so on.
If issue was not found, then the first action that is executed is a Create Issue action.
Last updated