From: wmorgan Date: Wed, 29 Aug 2007 17:00:13 +0000 (+0000) Subject: improved mime headers, yet again X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=7fa0d92e978fdeaad24d25e3b7b6c8894755dbfb;p=sup improved mime headers, yet again git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@551 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index 779f1c6..853f4da 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -247,6 +247,7 @@ protected body_m = RMail::Message.new body_m.body = @body.join body_m.body += sig_lines.join("\n") unless $config[:edit_signature] + body_m.header["Content-Type"] = "text/plain; charset=#{$encoding}" body_m.header["Content-Disposition"] = "inline" m.add_part body_m diff --git a/lib/sup/util.rb b/lib/sup/util.rb index c288795..c3d4ce6 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -68,8 +68,8 @@ module RMail a = Message.new t = MIME::Types.type_for(bfn).first || MIME::Types.type_for("exe").first - a.header.add "Content-Disposition", "attachment; filename=#{bfn}" - a.header.add "Content-Type", "#{t.content_type}; name=#{bfn}" + a.header.add "Content-Disposition", "attachment; filename=#{bfn.to_s.inspect}" + a.header.add "Content-Type", "#{t.content_type}; name=#{bfn.to_s.inspect}" a.header.add "Content-Transfer-Encoding", t.encoding a.body = case t.encoding