Skip to content

Commit

Permalink
Use Mail.read instead of Mail.new
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkeen committed Jul 10, 2012
1 parent a00ffc0 commit 435d348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/speedee/app.rb
Expand Up @@ -114,12 +114,12 @@ def flatten_replies(root_message)
end

def format_message(message)
mail_msg = Mail.new(message.filename)
mail_msg = Mail.read(message.filename)
{
from: message['From'],
to: message['To'],
date: message.date,
body: mail_msg.body.to_s.gsub("\n", "<br>").encode('UTF-8', invalid: :replace, :undef => :replace, replace: ''),
body: mail_msg.body.decoded.encode('UTF-8', :replace => '', :invalid => :replace, :undef => :replace).gsub("\n", "<br>"),
id: message.message_id
}
end
Expand Down

0 comments on commit 435d348

Please sign in to comment.