From 0844dd69d1fd4f337b96a10f436b211e92c2adf8 Mon Sep 17 00:00:00 2001 From: lnu Date: Mon, 19 Sep 2005 13:03:33 +0000 Subject: fixed problem with LF/CRLF in mails git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@62 f70e237a-67f3-0310-a06c-d2b8a7116972 --- ChangeLog | 3 ++- lib/feed2imap/imap.rb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f111535..42d0c9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,10 @@ Feed2Imap 0.5 (XX/09/2005) ============================ +* Mails were upload with \n only, but \r\n are needed. * Feed2Imap can now work without libopenssl. * Fixed a bug in the HTML2Text converter with tags without href. * Reserved characters (eg @) can now be included in the login, password or - folder. + folder. You just need to escape them. * Feed2Imap is now included in Debian (package name: feed2imap). * Much better handling of feeds with escaped HTML (LinuxFR for example). diff --git a/lib/feed2imap/imap.rb b/lib/feed2imap/imap.rb index 20f8ccb..6957489 100644 --- a/lib/feed2imap/imap.rb +++ b/lib/feed2imap/imap.rb @@ -95,7 +95,7 @@ class ImapAccount # Put the mail in the given folder # You should check whether the folder exist first. def putmail(folder, mail) - @connection.append(folder, mail) + @connection.append(folder, mail.gsub(/\n/, "\r\n")) end # update a mail @@ -109,7 +109,7 @@ class ImapAccount searchres.each { |m| @connection.store(m, "+FLAGS", [:Deleted]) } @connection.expunge end - @connection.append(folder, mail, flags) + @connection.append(folder, mail.gsub(/\n/, "\r\n"), flags) end # convert to string -- cgit v1.2.3-70-g09d2