houdini/app/mailers/nonprofit_admin_mailer.rb
Bradley M. Kuhn 6772312ea7 Relicense all .rb files under new project license.
The primary license of the project is changing to:
  AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later

with some specific files to be licensed under the one of two licenses:
   CC0-1.0
   LGPL-3.0-or-later

This commit is one of the many steps to relicense the entire codebase.

Documentation granting permission for this relicensing (from all past
contributors who hold copyrights) is on file with Software Freedom
Conservancy, Inc.
2018-03-25 15:10:40 -04:00

28 lines
1.1 KiB
Ruby

# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
class NonprofitAdminMailer < BaseMailer
def new_invite(role, raw_token)
@user = role.user
@title_with_article = Format::Indefinitize.with_article(role.name.to_s.titleize)
@nonprofit = role.host
@token = raw_token
mail(:to => @user.email, :subject => "You're now #{@title_with_article} of #{@nonprofit.name} on #{Settings.general.name}. Let's set your password.")
end
def existing_invite(role)
@user = role.user
@title_with_article = Format::Indefinitize.with_article(role.name.to_s.titleize)
@nonprofit = role.host
mail(:to => @user.email, :subject => "You're now #{@title_with_article} of #{@nonprofit.name} on #{Settings.general.name}.")
end
def supporter_fundraiser(event_or_campaign)
@fundraiser = event_or_campaign
@kind = event_or_campaign.class.name.downcase || 'event'
@nonprofit = event_or_campaign.nonprofit
@profile = event_or_campaign.profile
recipients = @nonprofit.nonprofit_personnel_emails
mail(to: recipients, subject: "A Supporter has created #{Format::Indefinitize.with_article(@kind.capitalize)} for your Nonprofit!")
end
end