From ef9996515099b8aa04df83080404dcff8badd85c Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 1 Nov 2015 13:58:54 +0100 Subject: Don't croak if no smtp settings in config file. --- lib/registration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/registration.rb b/lib/registration.rb index 9053ade..16be55a 100644 --- a/lib/registration.rb +++ b/lib/registration.rb @@ -10,7 +10,7 @@ def send_registration_emails_for(band, pdf_url) mail.subject = "Registrering av band #{@band.name} til Norsk Urskog" mail.body = erb :registration_email, :layout => false, :locals => { :pdf_url => pdf_url } - if settings.environment != :test && settings.smtp + if settings.environment != :test && settings.respond_to?(:smtp) mail.delivery_method :smtp, :address => settings.smtp['address'], :port => settings.smtp['port'] end mail.deliver! -- cgit v1.2.3