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.

In this case, the logic of the process is the following:

  1. We create an Incoming Queue Item from the incoming email

  2. All enabled mail handlers that are connected to the incoming connection are checked one-by-one

  3. The first one in line starts processing the email by checking the filters. If the handler returns with a FAILED or SUCCEDED status, the processing stops.

  4. If this handler returns with a FILTERED_OUT status (meaning that any of the filters stop the email from being further processed), the next handler in line repeats the process from step 3.

Mail handler operation

  1. 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.

    1. 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.

    2. 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

  2. Various filters are applied to accept or reject the incoming message from further processing. Learn more about this here: Filtering.

  3. The mail handler tries to find the corresponding issue. Learn more about the applied strategy here: Issue lookups.

  4. The mail handler searches for the user on whose behalf the actions will be executed, using the From address in the email:

    1. 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.

    2. 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.

    3. If the user is not found and Default reporter is not set or fallback is not enabled, execution is aborted.

  5. Actions are processed. Learn more about it here: Setting up rules and actions in the actions editor.

    1. 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.

    2. If issue was not found, then the first action that is executed is a Create Issue action.

Last updated