summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-11-01 12:57:55 +0100
committerHarald Eilertsen <haraldei@anduin.net>2015-11-01 13:39:38 +0100
commita06e5e7eb90206844fb21b317f1f923a527b3087 (patch)
tree77f6fad44cb7526156ec41c1d273b85ba959e2fc /lib
parent8dbc492863564ea93b9422a5fc791c63a329153a (diff)
downloadnorsk-urskog-registrations-a06e5e7eb90206844fb21b317f1f923a527b3087.tar.gz
norsk-urskog-registrations-a06e5e7eb90206844fb21b317f1f923a527b3087.tar.bz2
norsk-urskog-registrations-a06e5e7eb90206844fb21b317f1f923a527b3087.zip
Use mailcatcher to test emails during development.
Diffstat (limited to 'lib')
-rw-r--r--lib/registration.rb3
1 files changed, 3 insertions, 0 deletions
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