Browse files

added correct content type when attachemnts are involved

  • Loading branch information...
1 parent e83c019 commit 55823770d25013c857574ec30f7ebb759b03aff0 @ignu committed Apr 24, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 padrino-mailer/lib/padrino-mailer/delivery.rb
View
1 padrino-mailer/lib/padrino-mailer/delivery.rb
@@ -41,6 +41,7 @@ def build_tmail(options)
# or it will not be interpreted correctly by client.
body = TMail::Mail.new
body.body = options[:body] || ""
+ mail.content_type = "multipart/mixed"
body.content_type = options[:content_type] || "text/plain"
mail.parts.push body
(options[:attachments] || []).each do |name, body|

2 comments on commit 5582377

@ignu
Owner

couldn't find a good hook to test this, but it didn't look like it was being tested

@nesquena

This is actually all going to be removed as we rip out tmail altogether and use 'mail': http://github.com/padrino/padrino-framework/tree/refactor_mailer

I would love if you could review this branch and let me know if everything looks OK. Or ideally even test this if you could. mail simplifies the code considerably.

Please sign in to comment.