debian-mirror-gitlab/app/mailers/emails/pages_domains.rb

57 lines
1.7 KiB
Ruby
Raw Normal View History

2018-11-20 20:47:30 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module Emails
module PagesDomains
def pages_domain_enabled_email(domain, recipient)
@domain = domain
@project = domain.project
mail(
2019-12-21 20:55:43 +05:30
to: recipient.notification_email_for(@project.group),
2018-03-17 18:26:18 +05:30
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-12-21 20:55:43 +05:30
to: recipient.notification_email_for(@project.group),
2018-03-17 18:26:18 +05:30
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-12-21 20:55:43 +05:30
to: recipient.notification_email_for(@project.group),
2018-03-17 18:26:18 +05:30
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-12-21 20:55:43 +05:30
to: recipient.notification_email_for(@project.group),
2018-03-17 18:26:18 +05:30
subject: subject("ACTION REQUIRED: Verification failed for GitLab Pages domain '#{domain.domain}'")
)
end
2020-04-22 19:07:51 +05:30
def pages_domain_auto_ssl_failed_email(domain, recipient)
@domain = domain
@project = domain.project
subject_text = _("ACTION REQUIRED: Something went wrong while obtaining the Let's Encrypt certificate for GitLab Pages domain '%{domain}'") % { domain: domain.domain }
mail(
to: recipient.notification_email_for(@project.group),
subject: subject(subject_text)
)
end
2018-03-17 18:26:18 +05:30
end
end