2018-08-15 17:45:57 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-02-06 08:25:46 -05:00
|
|
|
module Emails
|
|
|
|
module PagesDomains
|
|
|
|
def pages_domain_enabled_email(domain, recipient)
|
|
|
|
@domain = domain
|
|
|
|
@project = domain.project
|
|
|
|
|
|
|
|
mail(
|
2019-09-30 08:06:01 -04:00
|
|
|
to: recipient.notification_email_for(@project.group),
|
2018-02-06 08:25:46 -05:00
|
|
|
subject: subject("GitLab Pages domain '#{domain.domain}' has been enabled")
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def pages_domain_disabled_email(domain, recipient)
|
|
|
|
@domain = domain
|
|
|
|
@project = domain.project
|
|
|
|
|
|
|
|
mail(
|
2019-09-30 08:06:01 -04:00
|
|
|
to: recipient.notification_email_for(@project.group),
|
2018-02-06 08:25:46 -05:00
|
|
|
subject: subject("GitLab Pages domain '#{domain.domain}' has been disabled")
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def pages_domain_verification_succeeded_email(domain, recipient)
|
|
|
|
@domain = domain
|
|
|
|
@project = domain.project
|
|
|
|
|
|
|
|
mail(
|
2019-09-30 08:06:01 -04:00
|
|
|
to: recipient.notification_email_for(@project.group),
|
2018-02-06 08:25:46 -05:00
|
|
|
subject: subject("Verification succeeded for GitLab Pages domain '#{domain.domain}'")
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def pages_domain_verification_failed_email(domain, recipient)
|
|
|
|
@domain = domain
|
|
|
|
@project = domain.project
|
|
|
|
|
|
|
|
mail(
|
2019-09-30 08:06:01 -04:00
|
|
|
to: recipient.notification_email_for(@project.group),
|
2018-02-06 08:25:46 -05:00
|
|
|
subject: subject("ACTION REQUIRED: Verification failed for GitLab Pages domain '#{domain.domain}'")
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|