vendor/rails/actionmailer/lib/action_mailer/part.rb in radiant-0.6.4 vs vendor/rails/actionmailer/lib/action_mailer/part.rb in radiant-0.6.5
- old
+ new
@@ -82,14 +82,11 @@
part.set_content_type(real_content_type, nil, ctype_attrs)
part.set_content_disposition(content_disposition)
end
else
if String === body
- part = TMail::Mail.new
- part.body = body
- part.set_content_type(real_content_type, nil, ctype_attrs)
- part.set_content_disposition "inline"
- m.parts << part
+ @parts.unshift Part.new(:charset => charset, :body => @body, :content_type => 'text/plain')
+ @body = nil
end
@parts.each do |p|
prt = (TMail::Mail === p ? p : p.to_mail(defaults))
part.parts << prt