mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
add list unsubscribe
This commit is contained in:
parent
f9e33ec6b8
commit
b82e408351
4 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
require_dependency 'email_builder'
|
require_dependency 'email_builder'
|
||||||
|
|
||||||
class InviteMailer < ActionMailer::Base
|
class InviteMailer < ActionMailer::Base
|
||||||
|
default charset: 'UTF-8'
|
||||||
include EmailBuilder
|
include EmailBuilder
|
||||||
|
|
||||||
def send_invite(invite)
|
def send_invite(invite)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
require_dependency 'email_builder'
|
require_dependency 'email_builder'
|
||||||
|
|
||||||
class TestMailer < ActionMailer::Base
|
class TestMailer < ActionMailer::Base
|
||||||
|
default charset: 'UTF-8'
|
||||||
include EmailBuilder
|
include EmailBuilder
|
||||||
|
|
||||||
def send_test(to_address)
|
def send_test(to_address)
|
||||||
|
|
|
@ -2,6 +2,8 @@ require_dependency 'markdown_linker'
|
||||||
require_dependency 'email_builder'
|
require_dependency 'email_builder'
|
||||||
|
|
||||||
class UserNotifications < ActionMailer::Base
|
class UserNotifications < ActionMailer::Base
|
||||||
|
default charset: 'UTF-8'
|
||||||
|
|
||||||
include EmailBuilder
|
include EmailBuilder
|
||||||
|
|
||||||
def signup(user, opts={})
|
def signup(user, opts={})
|
||||||
|
|
|
@ -12,6 +12,7 @@ module EmailBuilder
|
||||||
if params[:add_unsubscribe_link]
|
if params[:add_unsubscribe_link]
|
||||||
body << "\n"
|
body << "\n"
|
||||||
body << I18n.t("unsubscribe_link", params)
|
body << I18n.t("unsubscribe_link", params)
|
||||||
|
headers 'List-Unsubscribe' => "<#{params[:user_preferences_url]}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
mail_args = {
|
mail_args = {
|
||||||
|
|
Loading…
Reference in a new issue