https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292012-10-12T21:33:39ZRedmineRedmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=419882012-10-12T21:33:39ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Category</strong> set to <i>Email receiving</i></li></ul><p>Could you attach one of these emails (in raw format) so I can try to reproduce?</p> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=422682012-10-24T04:19:35ZRob D
<ul><li><strong>File</strong> <a href="/attachments/8399">Raw format from telnet retr.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8399/Raw%20format%20from%20telnet%20retr.txt">Raw format from telnet retr.txt</a> added</li><li><strong>File</strong> <a href="/attachments/8400">Outlook format from sent items.msg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8400/Outlook%20format%20from%20sent%20items.msg">Outlook format from sent items.msg</a> added</li><li><strong>File</strong> <a href="/attachments/8401">Sample redmine notification showing problem.msg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8401/Sample%20redmine%20notification%20showing%20problem.msg">Sample redmine notification showing problem.msg</a> added</li></ul><p>I hope these help, please let me know if you need anything else.</p>
<p>Is it possible to call the receive_pop3 rake task with a debug option that saves the raw emails?</p> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=451282013-01-29T15:43:14ZSteve Clay
<ul></ul><p>We're experiencing this problem, but I'm suspicious it's related to the WYSIWYG functionality. Redmine seems to assume plain text entry and a plain-to-HTML filter on output, and when you enable WYSIWYG editing, the system assumes the content will be HTML and does not run it through a plain-to-HTML filter. When we turned on the WYSIWYG after a few weeks of use, all existing content showed up as described here (without any P/BR breaks).</p>
<p>So I think Redmine is receiving the e-mails, normalizing to a plain text format, but since we have the WYSIWYG on, that plain text is not sent through the plain-to-HTML filter. If that's the case we could either allow HTML e-mail received to be saved directly as markup in Redmine, or we could <em>always</em> apply a plain-to-HTML filter to handle old plain text content added by e-mail/before WYSIWYG was enabled. E.g. Markdown permits P elements to passthrough as is.</p> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=452662013-02-04T22:32:16ZSteve Clay
<ul></ul><p>We've confirmed that disabling the WYSIWYG eliminates the problem, so I'm guessing the fix will be having the WYSIWYG plugin run incoming e-mail content through something like <code>email_content.gsub(/\n/, '<br />')</code></p> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=520422013-09-25T04:07:50ZRob D
<ul><li><strong>File</strong> <a href="/attachments/10522">1.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/10522/1.png">1.png</a> added</li></ul><p>Upgraded to 2.3.3 - but the problem still exists.</p>
<p><img src="https://www.redmine.org/attachments/download/10522/1.png" alt="" /></p> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=574812014-07-11T16:46:20ZYang Tang
<ul></ul><p>Hi,</p>
<p>We have the similar issue on Redmine 1.4.</p>
<p>In our case, it caused by HTML email parser in Redmine 1.4 is incompatible with the latest Microsoft Exchange server. To fix our issue, we modified <code>mail_handler.rb</code> file likes below, and then it works well.</p>
<pre>
Index: mail_handler.rb
===================================================================
--- mail_handler.rb (revision 9776)
+++ mail_handler.rb (working copy)
@@ -346,7 +346,8 @@
if plain_text_part.nil?
# no text/plain part found, assuming html-only email
# strip html tags and remove doctype directive
- @plain_text_body = strip_tags(@email.body.to_s)
+ # @plain_text_body = strip_tags(@email.body.to_s)
+ @plain_text_body = strip_tags(@email.body.to_s.gsub!(/<o:p>/, '<o:p>&nbsp;').gsub!(/<br>/, "\n").gsub!(/&nbsp;/, "\n"))
@plain_text_body.gsub! %r{^<!DOCTYPE .*$}, ''
else
@plain_text_body = plain_text_part.body.to_s
</pre>
<p>Hope it can help you to resolve issues</p>
<p>Regards,</p>
<p>Yang</p> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=579712014-08-10T00:11:31ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/16962">Feature #16962</a>: Better handle html-only emails</i> added</li></ul> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=579732014-08-10T00:11:42ZToshi MARUYAMA
<ul></ul><p>Try <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Better handle html-only emails (Closed)" href="https://www.redmine.org/issues/16962">#16962</a> patch.</p> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=634602015-04-29T16:13:53ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/19740">Defect #19740</a>: "Truncate emails after one of these lines" setting is not working</i> added</li></ul> Redmine - Defect #12025: rake receive_pop3 is stripping formatting and new lineshttps://www.redmine.org/issues/12025?journal_id=648242015-07-14T00:18:53ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>I think this issue is fixed by <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Better handle html-only emails (Closed)" href="https://www.redmine.org/issues/16962">#16962</a>.<br />If you still have problems, please create new issue.</p>