From a06e5e7eb90206844fb21b317f1f923a527b3087 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 1 Nov 2015 12:57:55 +0100 Subject: Use mailcatcher to test emails during development. --- lib/registration.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/registration.rb b/lib/registration.rb index 5ace438..e576cb0 100644 --- a/lib/registration.rb +++ b/lib/registration.rb @@ -10,6 +10,9 @@ def send_registration_emails_for(band) mail.subject = "Registrering av band #{@band.name} til Norsk Urskog" mail.body = 'Neijassådu!' + if settings.environment != :test && settings.smtp + mail.delivery_method :smtp, :address => settings.smtp['address'], :port => settings.smtp['port'] + end mail.deliver! end -- cgit v1.2.3