diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2015-11-01 13:58:54 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2015-11-01 13:58:54 +0100 |
commit | ef9996515099b8aa04df83080404dcff8badd85c (patch) | |
tree | a178703c96675f11ab1e92f21219a6963a7b12f2 | |
parent | eef0dae084b64686658549265345fdd94b16fdf3 (diff) | |
download | norsk-urskog-registrations-ef9996515099b8aa04df83080404dcff8badd85c.tar.gz norsk-urskog-registrations-ef9996515099b8aa04df83080404dcff8badd85c.tar.bz2 norsk-urskog-registrations-ef9996515099b8aa04df83080404dcff8badd85c.zip |
Don't croak if no smtp settings in config file.
-rw-r--r-- | lib/registration.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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! |