From 4b24801a4eeef63f99f812e778a5868051639f4a Mon Sep 17 00:00:00 2001 From: lnu Date: Wed, 3 Oct 2007 19:33:24 +0000 Subject: fix html emails content-type-encoding git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@138 f70e237a-67f3-0310-a06c-d2b8a7116972 --- ChangeLog | 1 + lib/feed2imap/itemtomail.rb | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d979642..6293652 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ Feed2Imap 0.9.2 (XX/10/2007) * Safer cache writing. Should avoid some cache corruption problems. * Now exits when we receive an IMAP error, instead of trying to recover. We shouldn't receive IMAP errors anyway. Closes Debian #405070. +* Fixed content-type-encoding in HTML emails. Reported by Arnt Gulbrandse. Feed2Imap 0.9.1 (15/05/2007) ============================ diff --git a/lib/feed2imap/itemtomail.rb b/lib/feed2imap/itemtomail.rb index 4a6284f..56232b6 100644 --- a/lib/feed2imap/itemtomail.rb +++ b/lib/feed2imap/itemtomail.rb @@ -81,11 +81,8 @@ def item_to_mail(item, index, updated, from = 'Feed2Imap') textpart.body = item.to_text htmlpart = RMail::Message::new htmlpart.header['Content-Type'] = 'text/html; charset=utf-8' - htmlpart.header['Content-Transfer-Encoding'] = '7bit' - if item.respond_to?(:to_html_with_headers) - htmlpart.body = item.to_html_with_headers - else - htmlpart.body = '' + item.to_html + '' + htmlpart.header['Content-Transfer-Encoding'] = '8bit' + htmlpart.body = item.to_html end message.add_part(textpart) message.add_part(htmlpart) -- cgit v1.2.3-54-g00ecf