mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
14 lines
536 B
Ruby
14 lines
536 B
Ruby
require_dependency 'email/message_builder'
|
|
|
|
class SubscriptionMailer < ActionMailer::Base
|
|
include Email::BuildEmailHelper
|
|
|
|
def confirm_unsubscribe(user, opts={})
|
|
unsubscribe_key = DigestUnsubscribeKey.create_key_for(user)
|
|
build_email user.email,
|
|
template: "unsubscribe_mailer",
|
|
site_title: SiteSetting.title,
|
|
site_domain_name: Discourse.current_hostname,
|
|
confirm_unsubscribe_link: "#{Discourse.base_url}/unsubscribe/#{unsubscribe_key}?from_all=true"
|
|
end
|
|
end
|