commit 7fa0d92e978fdeaad24d25e3b7b6c8894755dbfb
parent 869bb3f02c531f6f78f17760a219c963fb602cb0
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Wed, 29 Aug 2007 17:00:13 +0000
improved mime headers, yet again
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@551 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git 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
@@ -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