Skip to content
Browse files

fix from field being set as header object by restoring mail.from.first

  • Loading branch information...
1 parent 82b5278 commit 39460affbc07d48d36e7ca48e3f326747a4f59d7 @adzap committed Jan 19, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/action_mailer/ar_mailer.rb
View
2 lib/action_mailer/ar_mailer.rb
@@ -23,7 +23,7 @@ def self.email_class
# used.
def perform_delivery_activerecord(mail)
- sender = (mail['return-path'] && mail['return-path'].spec) || mail['from']
+ sender = (mail['return-path'] && mail['return-path'].spec) || mail.from.first
mail.destinations.each do |destination|
self.class.email_class.create :mail => mail.encoded, :to => destination, :from => sender
end

0 comments on commit 39460af

Please sign in to comment.
Something went wrong with that request. Please try again.