Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira is not stripping our prior replies from HTML emails from Outlook clients

Kelly Schoenhofen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2012

Jira isn't stripping out prior replies on emails that come from users using Outlook & HTML email format. Your page here:

https://confluence.atlassian.com/display/JIRAKB/How+to+Strip+the+Old+Reply+Data+from+Email+When+Using+Outlook

gives some guidelines that don't work with HTML emails, only plaintext emails. One of the commentors suggested /From:*/ but that cuts off replies from the first From, as colon isn't apparently counted as wordspace in a regex expression. What is your best solution to solve this?

4 answers

1 accepted

1 vote
Answer accepted
Kelly Schoenhofen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2012

The best I can come up with for both Outlook emails and external emails is this regex:

Split Regex: /From: |> /

That looks for either "From " (with a space) and "> " with a space. It is correctly snipping off prior bits 95% of the time; we don't have alot of people that intersperse quotes with comments either. It's just going to have to be a learned behavior. I think intelligent email parsing is a gap in Jira (5.1 or greater) at the moment.

Edit April 16th, 2013.

We have a handful of users using the Mail program in Windows 8, and Microsoft had to once again reinvent the wheel with their quote standard. This should catch Windows 8 Mail replies along with a handful of other clients:

Split Regex: /From: |> |Sent from Windows Mail|---Original Message---/

1 vote
Marcus Silveira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 6, 2012

Hi Kelly,

I believe you can remove the quotes from your Outlook emails with the following:

Use "Create or Comment Handler" with Strip Quotes enabled;

Edit the file "outlook-email.translations" located at JIRA-INSTALL/atlassian-jira/WEB-INF/classes and add "From:" at a new line (without the quotes);

This should tell JIRA that From: is also a mark os quoted content.

Hope this helps,

Marcus

Kelly Schoenhofen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2012

I intend on keeping Jira up to date, so solutions that involve editing internal Jira files are least desirable to me. I accomplished what should be almost as good with:

/From: /

In the handler. The handler settings should be saved in Jira's DB, so next upgrade there is nothing to migrate or recreate.

I tried a couple varieties like anchoring it, i.e. /^From:*/, but apparently the regex engine Jira uses reads the entire email as a single string, so it failed to match since a legitimate email wouldn’t start with From:. You’d have to get a linefeed search in there as well, which I cannot do (my ship has broken on the shoals of regex).

-Kelly

Deleted user November 7, 2012

JEMH allows the dynamic modification of regexps without JIRA tweaks or restarts.

srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2013

When we reply from mobile, it is still adding a some extra content. How can that be controlled?

Srinivas

0 votes
Markus Zimmermann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 21, 2014

Looks like a lot of people have the same problems with incoming mails. I made a small script which can trim text and html content and also remove referenced attachments of the trimmed content.

Please have a look https://github.com/zimmski/filter-reply-mails

0 votes
Mirek
Community Champion
April 15, 2013

Hi Kelly,

I had exactly the same problem.. You can check also my regex

https://answers.atlassian.com/questions/54911/jira-comments-from-email?page=1#78627

Best Regards,

Mirek

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events