* feat: create a from_email_address and a reply_to_email_address * feat: update other mailers with the new SMTP email settings * test: update all spec files * fix: use the SMTP::Settings value * fix tests * spec: fix the comma * feat: tighten some logic * fix: test * fix tests * fix tests * final fix test commit * fix test * fix test * oops * feat: add a reply_to for Devise Mailer * chore: update the description * use a proc for reply_to * feat: update text * Update spec/mailers/digest_mailer_spec.rb Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> * Update spec/mailers/verification_mailer_spec.rb Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> * Update spec/mailers/shared_examples/renders_proper_email_headers.rb Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> * refactor: move OPTIONS to a helper as its only being used in the view layer Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
16 lines
684 B
Ruby
16 lines
684 B
Ruby
class VerificationMailer < ApplicationMailer
|
|
default from: lambda {
|
|
I18n.t("mailers.verification_mailer.from", community: Settings::Community.community_name,
|
|
email: ForemInstance.from_email_address)
|
|
}
|
|
|
|
def account_ownership_verification_email
|
|
@user = User.find(params[:user_id])
|
|
email_authorization = EmailAuthorization.create!(user: @user, type_of: "account_ownership")
|
|
@confirmation_token = email_authorization.confirmation_token
|
|
|
|
mail(to: @user.email,
|
|
subject: I18n.t("mailers.verification_mailer.verify_ownership",
|
|
community: Settings::Community.community_name))
|
|
end
|
|
end
|