From 6106c5b6ef4d9fe9804728471f94b0ef82da59cd Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 2 Oct 2017 17:29:42 +0200 Subject: Pass entire smtp config to Mail.deliver method. We may need to set credentials or other config in some situations. --- lib/registration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/registration.rb b/lib/registration.rb index 4f2db17..b82cdb4 100644 --- a/lib/registration.rb +++ b/lib/registration.rb @@ -12,7 +12,7 @@ def send_registration_emails_for(band, pdf_url) mail.body = erb :registration_email, :layout => false, :locals => { :pdf_url => pdf_url } if settings.environment != :test && settings.respond_to?(:smtp) - mail.delivery_method :smtp, :address => settings.smtp['address'], :port => settings.smtp['port'] + mail.delivery_method :smtp, settings.smtp end mail.deliver! rescue Net::SMTPError => e -- cgit v1.2.3