]> git.cworth.org Git - sup/commitdiff
improved mime headers, yet again
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 29 Aug 2007 17:00:13 +0000 (17:00 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 29 Aug 2007 17:00:13 +0000 (17:00 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@551 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/modes/edit-message-mode.rb
lib/sup/util.rb

index 779f1c63d3ef20515d1ab99ef0b2b74220935388..853f4daa5e317f4d88b5d2620999b311316ce4d1 100644 (file)
@@ -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
index c288795f0d66b50cdaed64697252cdf309fad7de..c3d4ce6a18ba689aff73918c5e88b394abda9bc4 100644 (file)
@@ -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