emails: update email templates.

* Add header with the Danbooru name and logo.
* Add footer with links to the site, the privacy policy, and the contact page.
* Add "You received this email because of X" messages to remind users why
  they received the email.
* Add basic CSS to make the design match the site.
This commit is contained in:
evazion
2022-09-27 08:19:13 -05:00
parent 331f15259a
commit e72073ca6b
6 changed files with 114 additions and 59 deletions

View File

@@ -4,7 +4,8 @@ class UserMailer < ApplicationMailer
# The email sent when a user receives a DMail.
def dmail_notice(dmail)
@dmail = dmail
mail(dmail.to, require_verified_email: true, subject: "#{Danbooru.config.app_name} - Message received from #{dmail.from.name}")
@user = dmail.to
mail(@user, require_verified_email: true, subject: "#{Danbooru.config.app_name}: #{dmail.from.name} sent you a message")
end
# The email sent when a user requests a password reset.