From eef0dae084b64686658549265345fdd94b16fdf3 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 1 Nov 2015 13:38:51 +0100 Subject: Include url to generated pdf in email. --- lib/registration.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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'] -- cgit v1.2.3