aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/action_mailer/base.rb')
-rw-r--r--actionmailer/lib/action_mailer/base.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 237e56ed0c..42d48fd5a6 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -413,14 +413,16 @@ module ActionMailer
m.date = sent_on.to_time rescue sent_on if sent_on
headers.each { |k, v| m[k] = v }
+ real_content_type, ctype_attrs = parse_content_type
+
if @parts.empty?
- m.set_content_type content_type, nil, { "charset" => charset }
+ m.set_content_type(real_content_type, nil, ctype_attrs)
m.body = Utils.normalize_new_lines(body)
else
if String === body
part = TMail::Mail.new
part.body = Utils.normalize_new_lines(body)
- part.set_content_type content_type, nil, { "charset" => charset }
+ part.set_content_type(real_content_type, nil, ctype_attrs)
part.set_content_disposition "inline"
m.parts << part
end
@@ -430,7 +432,7 @@ module ActionMailer
m.parts << part
end
- m.set_content_type(content_type, nil, { "charset" => charset }) if content_type =~ /multipart/
+ m.set_content_type(real_content_type, nil, ctype_attrs) if real_content_type =~ /multipart/
end
@mail = m