discourse/app/mailers/subscription_mailer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
522 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-01-20 04:25:25 -05:00
class SubscriptionMailer < ActionMailer::Base
include Email::BuildEmailHelper
def confirm_unsubscribe(user, opts = {})
unsubscribe_key = UnsubscribeKey.create_key_for(user, "all")
2016-01-20 04:25:25 -05:00
build_email user.email,
template: "unsubscribe_mailer",
site_title: SiteSetting.title,
site_domain_name: Discourse.current_hostname,
confirm_unsubscribe_link: email_unsubscribe_url(unsubscribe_key, host: Discourse.base_url)
2016-01-20 04:25:25 -05:00
end
end