From 6c21ed9e3fa837c797a4de27ea3a59ff2404454f Mon Sep 17 00:00:00 2001 From: Lucas Nussbaum Date: Sun, 13 Jul 2008 17:33:13 +0200 Subject: added wrapping of text output --- lib/feed2imap/itemtomail.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/feed2imap/itemtomail.rb') diff --git a/lib/feed2imap/itemtomail.rb b/lib/feed2imap/itemtomail.rb index 91e6c18..27fc362 100644 --- a/lib/feed2imap/itemtomail.rb +++ b/lib/feed2imap/itemtomail.rb @@ -47,7 +47,7 @@ class String end end -def item_to_mail(item, index, updated, from = 'Feed2Imap', inline_images = false) +def item_to_mail(item, index, updated, from = 'Feed2Imap', inline_images = false, wrapto = false) message = RMail::Message::new if item.creator and item.creator != '' if item.creator.include?('@') @@ -77,9 +77,9 @@ def item_to_mail(item, index, updated, from = 'Feed2Imap', inline_images = false end end textpart = RMail::Message::new - textpart.header['Content-Type'] = 'text/plain; charset=utf-8' + textpart.header['Content-Type'] = 'text/plain; charset=utf-8; format=flowed' textpart.header['Content-Transfer-Encoding'] = '8bit' - textpart.body = item.to_text + textpart.body = item.to_text(true, wrapto) htmlpart = RMail::Message::new htmlpart.header['Content-Type'] = 'text/html; charset=utf-8' htmlpart.header['Content-Transfer-Encoding'] = '8bit' -- cgit v1.2.3-70-g09d2