mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +02:00
* Update dryrun output, email spacing, and update timing of when email sends out (7AMPT/10AMET)
This commit is contained in:
parent
8cdd58741c
commit
48bc6e568a
4 changed files with 27 additions and 17 deletions
4
.github/workflows/daily-notifications.yaml
vendored
4
.github/workflows/daily-notifications.yaml
vendored
|
@ -3,8 +3,8 @@ run-name: Run notifications
|
|||
|
||||
on:
|
||||
schedule:
|
||||
# Runs every day at 5:30 AM UTC.
|
||||
- cron: "30 5 * * *"
|
||||
# Runs every day at 14:00 UTC/7:00AM PT/10:00AM ET
|
||||
- cron: "0 14 * * *"
|
||||
|
||||
jobs:
|
||||
run-notifications:
|
||||
|
|
|
@ -9,6 +9,7 @@ from django.utils import timezone
|
|||
from registrar.models import Domain, UserDomainRole, UserPortfolioPermission
|
||||
from registrar.models.user import UserPortfolioRoleChoices
|
||||
from registrar.utility.email import send_templated_email, EmailSendingError
|
||||
from django.template.loader import render_to_string
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -84,9 +85,16 @@ class Command(BaseCommand):
|
|||
|
||||
try:
|
||||
if dryrun:
|
||||
rendered_subject = render_to_string(subject_template, context).strip()
|
||||
rendered_body = render_to_string(template, context)
|
||||
|
||||
logger.info(
|
||||
f"[DRYRUN] Would send email for domain {domain.name} where "
|
||||
f"TO: {domain_manager_emails} || CC: {portfolio_admin_emails}"
|
||||
f"[DRYRUN]\n"
|
||||
f"Would send email for domain {domain.name}\n"
|
||||
f"TO: {domain_manager_emails}\n"
|
||||
f"CC: {portfolio_admin_emails}\n"
|
||||
f"Subject: {rendered_subject}\n"
|
||||
f"Body:\n{rendered_body}"
|
||||
)
|
||||
else:
|
||||
send_templated_email(
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
{% autoescape off %}{# In a text file, we don't want to have HTML entities escaped #}
|
||||
|
||||
Hi, domain managers.
|
||||
|
||||
On {{ expiration_date }}, the following domain will expire: {{ domain }}
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
DOMAIN AT RISK FOR DELETION
|
||||
Currently, {{ domain }} doesn’t have name servers listed in the .gov registrar. If the domain expires without name servers, it will be deleted. To prevent deletion, you must renew this domain before {{ expiration_date }}.
|
||||
|
||||
HOW TO RENEW A DOMAIN
|
||||
There’s no cost to renew a domain. After renewal, the domain will be registered for another year.
|
||||
|
||||
Any domain manager can complete the process within the .gov registrar <{{ manage_url }}>.
|
||||
{% if portfolio %}
|
||||
Organization admins are cc’d on this email for awareness but do not need to take action.
|
||||
{% endif %}
|
||||
Any domain manager can complete the process within the .gov registrar <{{ manage_url }}>. {% if portfolio %} Organization admins are cc’d on this email for awareness but do not need to take action.{% endif %}
|
||||
|
||||
If you no longer need {{ domain }}, simply let the domain expire.
|
||||
|
||||
|
||||
THANK YOU
|
||||
.Gov helps the public identify official, trusted information. Thank you for requesting a .gov domain.
|
||||
.Gov helps the public identify official, trusted information. Thank you for using a .gov domain.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
{% autoescape off %}{# In a text file, we don't want to have HTML entities escaped #}
|
||||
|
||||
Hi, domain managers.
|
||||
|
||||
On {{ expiration_date }}, the following domain will expire: {{ domain }}
|
||||
----------------------------------------------------------------
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
HOW TO RENEW A DOMAIN
|
||||
There’s no cost to renew a domain. After renewal, the domain will be registered for another year.
|
||||
|
||||
Any domain manager can complete the process within the .gov registrar <{{ manage_url }}>.
|
||||
{% if portfolio %}
|
||||
Organization admins are cc’d on this email for awareness but do not need to take action.
|
||||
{% endif %}
|
||||
Any domain manager can complete the process within the .gov registrar <{{ manage_url }}>. {% if portfolio %} Organization admins are cc’d on this email for awareness but do not need to take action. {% endif %}
|
||||
|
||||
WHAT HAPPENS IF THE DOMAIN EXPIRES?
|
||||
When a .gov domain expires, it’s not automatically put on hold or deleted. It continues to resolve online even after its expiration date. Before we delete the domain, we’ll make every effort to contact your organization. We encourage you to renew the domain promptly if you're still using it.
|
||||
|
||||
If you no longer need {{ domain }}, reply to this email and let us know that you’d like to delete it.
|
||||
|
||||
|
||||
THANK YOU
|
||||
.Gov helps the public identify official, trusted information. Thank you for requesting a .gov domain.
|
||||
.Gov helps the public identify official, trusted information. Thank you for using a .gov domain.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue