The following should be conducted in a test environment.

  1. Configure a ScriptRunner Mail Handler for Local Files (see 2021-01-13_14-12-00_Add Incoming Mail Handler).

  2. Copy or write an email message in the <jira-home>/import/mail folder.

    See How to locate Jira Home Directory for details on how to locate your Jira home location. For more about file system messages, check the File System Messages section in Configuring Issues and Comments from Email.

  3. Start with a simple script such as:

    import com.atlassian.mail.MailUtils
    def subject = message.getSubject()
    def body = MailUtils.getBody(message)
    log.debug "${subject}"
    log.debug "${body}"

  4. Click the Run Now.

    A Script executed successfully notification appears if the mail handler ran as expected. If there is an error, a Cannot handle message notification appears. In the case of an unsuccessful execution, select More Details link to get more information.

  5. Once tested, add the configuration to your Jira instance.