1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

1.9 compatibility - don't pass an array as the from address as this ends up generating invalid SMTP commands.

This commit is contained in:
Friedrich Göpel 2009-06-09 20:22:20 +12:00 committed by Michael Koziarski
parent 74c1249d07
commit 1d57ccbc6f

View file

@ -697,7 +697,7 @@ module ActionMailer #:nodoc:
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)