mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 12:38:36 +02:00
Update email.py
This commit is contained in:
parent
4d8d722375
commit
cb9c4b3f57
1 changed files with 4 additions and 4 deletions
|
@ -109,13 +109,13 @@ def wrap_text_and_preserve_paragraphs(text, width):
|
||||||
str: Wrapped text with preserved paragraph structure.
|
str: Wrapped text with preserved paragraph structure.
|
||||||
"""
|
"""
|
||||||
# Split text into paragraphs by newlines
|
# Split text into paragraphs by newlines
|
||||||
paragraphs = text.split('\n')
|
paragraphs = text.split("\n")
|
||||||
|
|
||||||
# Add \n to any line that exceeds our max length
|
# Add \n to any line that exceeds our max length
|
||||||
wrapped_paragraphs = [textwrap.fill(paragraph, width=width) for paragraph in paragraphs]
|
wrapped_paragraphs = [textwrap.fill(paragraph, width=width) for paragraph in paragraphs]
|
||||||
|
|
||||||
# Join paragraphs with double newlines
|
# Join paragraphs with double newlines
|
||||||
return '\n'.join(wrapped_paragraphs)
|
return "\n".join(wrapped_paragraphs)
|
||||||
|
|
||||||
|
|
||||||
def send_email_with_attachment(sender, recipient, subject, body, attachment_file, ses_client):
|
def send_email_with_attachment(sender, recipient, subject, body, attachment_file, ses_client):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue