diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/base.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 59ee47a137..910ee8dd5b 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,5 +1,6 @@ require 'action_mailer/adv_attr_accessor' require 'action_mailer/part' +require 'tmail/net' module ActionMailer #:nodoc: # Usage: @@ -280,9 +281,12 @@ module ActionMailer #:nodoc: end def perform_delivery_smtp(mail) + destinations = mail.destinations + mail.ready_to_send + Net::SMTP.start(server_settings[:address], server_settings[:port], server_settings[:domain], server_settings[:user_name], server_settings[:password], server_settings[:authentication]) do |smtp| - smtp.sendmail(mail.encoded, mail.from, mail.destinations) + smtp.sendmail(mail.encoded, mail.from, destinations) end end |