diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2015-10-03 18:46:37 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2015-10-04 11:42:03 +0200 |
commit | 1f63803e7bdac1abe4219e98a1a7bd84529ec144 (patch) | |
tree | 16decb05b424158b171633b703841ab94cc18ecc /lib | |
parent | 1c48f48073e33875650b687ced05a51e0fd7f7d3 (diff) | |
download | norsk-urskog-registrations-1f63803e7bdac1abe4219e98a1a7bd84529ec144.tar.gz norsk-urskog-registrations-1f63803e7bdac1abe4219e98a1a7bd84529ec144.tar.bz2 norsk-urskog-registrations-1f63803e7bdac1abe4219e98a1a7bd84529ec144.zip |
Send email to Norsk Urskog when a band is registered.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/band.rb | 1 | ||||
-rw-r--r-- | lib/registration.rb | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/band.rb b/lib/band.rb index 44d1e7c..22778ff 100644 --- a/lib/band.rb +++ b/lib/band.rb @@ -11,6 +11,7 @@ class Band @website = params['website'] @label = params['label'] @short_bio = params['shortbio'] + @contact = Contact.new(params['contact']) @members = [] diff --git a/lib/registration.rb b/lib/registration.rb new file mode 100644 index 0000000..5a31ca0 --- /dev/null +++ b/lib/registration.rb @@ -0,0 +1,13 @@ +require 'band' +require 'mail' + +def send_registration_emails_for(band) + mail = Mail.new + mail.charset = 'UTF-8' + mail.to = 'haraldei@anduin.net' + mail.from = @band.contact.email + mail.subject = "Registrering av band #{@band.name} til Norsk Urskog" + mail.body = 'Neijassådu!' + + mail.deliver! +end |