diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2015-11-01 13:38:51 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2015-11-01 13:39:44 +0100 |
commit | eef0dae084b64686658549265345fdd94b16fdf3 (patch) | |
tree | bb95865088ff94ac84fe65ddb3fc8ceac79ddd71 /lib | |
parent | 5931fa9d67624943594968a10a4b38a682bf374c (diff) | |
download | norsk-urskog-registrations-eef0dae084b64686658549265345fdd94b16fdf3.tar.gz norsk-urskog-registrations-eef0dae084b64686658549265345fdd94b16fdf3.tar.bz2 norsk-urskog-registrations-eef0dae084b64686658549265345fdd94b16fdf3.zip |
Include url to generated pdf in email.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/registration.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/registration.rb b/lib/registration.rb index e576cb0..9053ade 100644 --- a/lib/registration.rb +++ b/lib/registration.rb @@ -2,13 +2,13 @@ require_relative 'band' require_relative 'pdf_form' require 'mail' -def send_registration_emails_for(band) +def send_registration_emails_for(band, pdf_url) 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.body = erb :registration_email, :layout => false, :locals => { :pdf_url => pdf_url } if settings.environment != :test && settings.smtp mail.delivery_method :smtp, :address => settings.smtp['address'], :port => settings.smtp['port'] |