2024-02-25 12:15:55 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2010-02-20 18:08:22 -05:00
|
|
|
class UserMailer < ActionMailer::Base
|
2021-02-23 16:21:33 -05:00
|
|
|
helper ApplicationHelper
|
|
|
|
helper UsersHelper
|
2019-09-13 15:46:44 -04:00
|
|
|
default :from => Danbooru.config.mail_from_addr, :content_type => "text/html"
|
2010-02-20 18:08:22 -05:00
|
|
|
|
|
|
|
def dmail_notice(dmail)
|
|
|
|
@dmail = dmail
|
2013-03-19 08:10:10 -04:00
|
|
|
mail(:to => "#{dmail.to.name} <#{dmail.to.email}>", :subject => "#{Danbooru.config.app_name} - Message received from #{dmail.from.name}")
|
2010-02-20 18:08:22 -05:00
|
|
|
end
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-08-07 20:43:28 -04:00
|
|
|
def forum_notice(user, forum_topic, forum_posts)
|
2015-09-03 20:03:03 -04:00
|
|
|
@user = user
|
2014-08-07 20:43:28 -04:00
|
|
|
@forum_topic = forum_topic
|
|
|
|
@forum_posts = forum_posts
|
|
|
|
mail(:to => "#{user.name} <#{user.email}>", :subject => "#{Danbooru.config.app_name} forum topic #{forum_topic.title} updated")
|
|
|
|
end
|
2010-02-20 18:08:22 -05:00
|
|
|
end
|