* Move emails from users table to email_addresses table. * Validate that addresses are formatted correctly and are unique across users. Existing invalid emails are grandfathered in. * Add is_verified flag (the address has been confirmed by the user). * Add is_deliverable flag (an undeliverable address is an address that bounces). * Normalize addresses to prevent registering multiple accounts with the same email address (using tricks like Gmail's plus addressing).
15 lines
437 B
Ruby
15 lines
437 B
Ruby
class UserMailer < ApplicationMailer
|
|
add_template_helper ApplicationHelper
|
|
add_template_helper UsersHelper
|
|
|
|
def dmail_notice(dmail)
|
|
@dmail = dmail
|
|
mail to: dmail.to.email_with_name, subject: "#{Danbooru.config.app_name} - Message received from #{dmail.from.name}"
|
|
end
|
|
|
|
def password_reset(user)
|
|
@user = user
|
|
mail to: @user.email_with_name, subject: "#{Danbooru.config.app_name} password reset request"
|
|
end
|
|
end
|