Vote #68355
完了Improvements in truncate email
100%
説明
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
journals
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.
--------------------------------------------------------------------------------
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...
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
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).
--------------------------------------------------------------------------------
related_issues
relates,Closed,2852,Clean Incoming Email of quoted text "----- Reply above this line ------"