Permalink
Browse files

1.9 compatibility - don't pass an array as the from address as this e…

…nds up generating invalid SMTP commands.
  • Loading branch information...
1 parent d63fab3 commit 72d111a21ca21460a320d7611b1fdf07d01ffeb1 Friedrich Göpel committed with NZKoz Jun 9, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionmailer/lib/action_mailer/base.rb
View
2 actionmailer/lib/action_mailer/base.rb
@@ -674,7 +674,7 @@ def create_mail
def perform_delivery_smtp(mail)
destinations = mail.destinations
mail.ready_to_send
- sender = (mail['return-path'] && mail['return-path'].spec) || mail.from
+ sender = (mail['return-path'] && mail['return-path'].spec) || mail['from']
smtp = Net::SMTP.new(smtp_settings[:address], smtp_settings[:port])
smtp.enable_starttls_auto if smtp_settings[:enable_starttls_auto] && smtp.respond_to?(:enable_starttls_auto)

3 comments on commit 72d111a

@lardawge

Wondering why the patch in this thread didn't get applied in 2.3.4...
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2340

It's not mine but I would be happy to submit a pull request just to get it fixed... my initializer folder is getting too full with work arounds ;)

Please sign in to comment.