identity-vault/app/mailers/application_mailer.rb
nora 87bb6d4a18
Switch mailers to SES (#72)
* add premailer

* first pass at converting existing mailers

* this EIN is not yours :-P

* remove some css that probably won't work

* that was gonna bug me

* more mailers!

* s/account/auth

* rework 2fa/security mailers

* env vars for SES creds

* add OpenSSL explicitly

* use external logo image

* nuke step_up_code
2025-12-04 16:32:32 -05:00

21 lines
449 B
Ruby

class ApplicationMailer < ActionMailer::Base
include Rails.application.routes.url_helpers
layout "mailer"
ACCOUNT_FROM = "Hack Club <auth@hackclub.com>".freeze
IDENTITY_FROM = "Hack Club <identity@hackclub.com>".freeze
private
def env_prefix
case Rails.env
when "development" then "[DEV] "
when "staging" then "[STAGING] "
else ""
end
end
def prefixed_subject(subject)
"#{env_prefix}#{subject}"
end
end