mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
toggle email wrap
This commit is contained in:
parent
db0d4a1eb2
commit
2766202952
2 changed files with 4 additions and 2 deletions
|
@ -683,6 +683,7 @@ class DomainRequest(TimeStampedModel):
|
|||
"reason": self.action_needed_reason,
|
||||
"email": self.action_needed_reason_email,
|
||||
"excluded_reasons": [DomainRequest.ActionNeededReasons.OTHER],
|
||||
"wrap_email": True,
|
||||
},
|
||||
self.DomainRequestStatus.REJECTED: {
|
||||
"cached_reason": self._cached_rejection_reason,
|
||||
|
@ -690,6 +691,7 @@ class DomainRequest(TimeStampedModel):
|
|||
"email": self.rejection_reason_email,
|
||||
"excluded_reasons": [],
|
||||
# "excluded_reasons": [DomainRequest.RejectionReasons.OTHER],
|
||||
"wrap_email": False,
|
||||
},
|
||||
}
|
||||
status_info = status_information.get(status)
|
||||
|
@ -713,7 +715,7 @@ class DomainRequest(TimeStampedModel):
|
|||
email_template_subject="emails/status_change_subject.txt",
|
||||
bcc_address=bcc_address,
|
||||
custom_email_content=status_info.get("email"),
|
||||
wrap_email=True,
|
||||
wrap_email=status_information.get("wrap_email"),
|
||||
)
|
||||
|
||||
def sync_yes_no_form_fields(self):
|
||||
|
|
|
@ -78,7 +78,7 @@ def send_templated_email(
|
|||
# Wrap the email body to a maximum width of 80 characters per line.
|
||||
# Not all email clients support CSS to do this, and our .txt files require parsing.
|
||||
if wrap_email:
|
||||
email_body = wrap_text_and_preserve_paragraphs(email_body, width=110)
|
||||
email_body = wrap_text_and_preserve_paragraphs(email_body, width=80)
|
||||
|
||||
ses_client.send_email(
|
||||
FromEmailAddress=settings.DEFAULT_FROM_EMAIL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue