Remove previous content from incoming email from Jira server in Microsoft Outlook
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
When replying to a received HTML format notification from an issue, the old reply data does not strip out properly when using Outlook as the email client.
Cause
For the Incoming Mail Handler, the "stripquotes=true" option does not strip the old reply data properly when using Outlook. This is due to JRA-14543 - Getting issue details... STATUS .
Workaround
Customisations to Velocity templates or other JIRA files are not included in the scope of Atlassian Support.
Deploying Velocity Templates without a Restart
In a development instance, you can play with picking up velocity file changes without a restart.
From <jira-install>/atlassian-jira/WEB-INF/classes/velocity.properties
:
- Change class.resource.loader.cache from true to false
Uncomment (remove the # sign) from
#velocimacro.library.autoreload=true
to
velocimacro.library.autoreload=true
- Restart Jira for the changes in
velocity.properties
to take effect. After this, you can deploy velocity template changes without a restart.
Keep in mind that the next time you upgrade JIRA – or need a new installation for any reason – you will have to manually copy any changes you have made to the JSPs or tempates into the new installation of JIRA. If the JSPs or templates have changed in the newer version, you will have to port your customization into them.
Applying the change in the templates:
- Log in as a user with the JIRA Administrators global permission.
- Choose > System. Select Mail > Incoming Mail to open the Incoming Mail page.
Keyboard shortcut: g + g + start typing incoming mail - Edit the Mail Handler.
- The Handler dropdown menu has several options:
- Method 1: The method below will only trim everything below the "---- Original Message ----" using the mail handler 'Create a new issue or add a comment to an existing issue'.
- Method 2: The method below will trim anything below the line "---- Original Message ----" using the mail handler 'Add a comment before a specified marker or separator in the email body'.
- Method 3: The method below will strip anything after "From: " in a reply message, using the mail handler 'Add a comment before a specified marker or separator in the email body'.
- Method 4: The method will strip anything after "From:" in using the mail handler 'Create a new issue or add a comment to an existing issue'.
- Method 5: The method will use a broader regular expression to catch content, using the mail handler 'Add a comment before a specified marker or separator in the email body'.
For further tips regarding other workarounds take a look at the comments below.