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
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