Feature #6628

Improvements in truncate email

Added by Ashwin Date about 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:2010-10-11
Priority:NormalDue date:
Assignee:Eric Davis% Done:

100%

Category:Email receiving
Target version:1.1.0
Resolution:Fixed

Description

Rather than hunting for a correct regexp, why can't we simply set a line -

-- Reply above this line --

The above line is at the very top of the message, and the email parsing script will simply chop off the body after this line. Isn't this simpler than the existing feature. I believe this is how most software that do 'reply by email' work.

To make it backward compatible, this could be an additional option

redmine-email.jpg - This is the email that I get (37.5 KB) Ashwin Date, 2010-10-20 16:44

update-with-garbage.jpg - This is how the update looks on the issue page (50.6 KB) Ashwin Date, 2010-10-20 16:44


Related issues

Related to Redmine - Feature #2852: Clean Incoming Email of quoted text "----- Reply above th... Closed 2009-02-27

Associated revisions

Revision 4361
Added by Eric Davis about 7 years ago

Remove email quotes (>) when searching for incoming email delimiters. #2852 #6628

Changes the email truncation so a delimiter can be prefixed by email
quotes or spaces ("> Eric said..."). This will let it be combined with
a "--- Reply above ---" delimiter to match "> --- Reply above ---"

Revision 4362
Added by Eric Davis about 7 years ago

Add a Email Header setting. Useful for adding delimiters to every email.

#2852 #6628

History

#1 Updated by Holger Just about 7 years ago

There is already the possibility to define delimiter strings. See Administration > Settings -> Incoming emails. To include the line you chose, you might have to update the template for sent mails.

#2 Updated by Ashwin Date about 7 years ago

Thanks a lot for the idea Holger. I think that should work perfectly. Will try tomorrow and post results.

Thats what happens when you try to think when it's sleep time...

#3 Updated by Ashwin Date about 7 years ago

Ok I tried this. Here's what I did

In the settings, changed Truncate email after.... to
\-\-Reply above this line\-\-

Edited the config/locales/en.yml and changed
text_issue_updated: "Issue {{id}} has been updated by {{author}}."
to
text_issue_updated: "--Reply above this line--<br />Issue {{id}} has been updated by {{author}}."

The email that I received had that line as expected, but when it got added as a comment, it had all the text underneath. Have attached screenshots of how the email looks and how the issue update looks.

Note that I also tried the following in the en.yml
text_issue_updated: "--Reply above this line--\nIssue {{id}} has been updated by {{author}}."
text_issue_updated: "--Reply above this line-- Issue {{id}} has been updated by {{author}}."

I've set the notification emails to plain text

#4 Updated by Ashwin Date about 7 years ago

Note that the
\-\-Reply above this line\-\-
above should have been
--Reply above this line--

I don't have the slashes either in the settings or the en.yml

#5 Updated by Eric Davis about 7 years ago

  • Status changed from New to Closed
  • Assignee set to Eric Davis
  • Target version set to 1.1.0
  • % Done changed from 0 to 100
  • Resolution set to Fixed

I've updated the email truncation in r4361 and r4362 to support reply quotes in front of the delimiter string (> ) and to allow setting a standard header for all emails.

Ashwin: with this you can now set your "Truncate emails" to "--Reply above this line--" and add that to your Email Header (Admin > Settings > Email Notifications and Incoming Emails).

Also available in: Atom PDF