2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-05 01:59:22 +08:00
|
|
|
class AdminConfirmationMailer < ActionMailer::Base
|
|
|
|
include Email::BuildEmailHelper
|
|
|
|
|
2019-11-04 17:17:00 +08:00
|
|
|
def send_email(to_address, target_email, target_username, token)
|
2017-04-05 01:59:22 +08:00
|
|
|
build_email(
|
|
|
|
to_address,
|
|
|
|
template: 'admin_confirmation_mailer',
|
2019-11-04 17:17:00 +08:00
|
|
|
target_email: target_email,
|
2017-04-05 01:59:22 +08:00
|
|
|
target_username: target_username,
|
2017-10-28 04:46:02 +08:00
|
|
|
admin_confirm_url: confirm_admin_url(token: token, host: Discourse.base_url)
|
2017-04-05 01:59:22 +08:00
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|