summaryrefslogtreecommitdiffstats
path: root/lib/registration.rb
blob: 9826f916c4ded9ce07a4564fefd7f19674a90602 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require_relative 'band'
require_relative 'pdf_form'
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

def generate_pdf_for(band)
  pdf = PDFForm.new(band)
  pdf.render
end