mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
852860de66
- All unsubscribes go to the exact same page - You may unsubscribe from watching a category on that page - You no longer need to be logged in to unsubscribe from a topic - Simplified footer on emails
14 lines
523 B
Ruby
14 lines
523 B
Ruby
require_dependency 'email/message_builder'
|
|
|
|
class SubscriptionMailer < ActionMailer::Base
|
|
include Email::BuildEmailHelper
|
|
|
|
def confirm_unsubscribe(user, opts={})
|
|
unsubscribe_key = UnsubscribeKey.create_key_for(user, "all")
|
|
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}"
|
|
end
|
|
end
|