Skip to content

Commit

Permalink
wrap unsubscribe url in <>
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Mar 8, 2024
1 parent 66b475f commit 929619a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fixbackend/notification/email/email_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def send_email(
subject: str,
text: str,
html: Optional[str],
unsubscribe: bool = False,
unsubscribe: bool = True,
) -> None: # pragma: no cover

unsubscribe_url = ""
Expand All @@ -89,7 +89,7 @@ def send_email() -> None:
msg["From"] = "[email protected]"
msg["To"] = to
if unsubscribe:
msg.add_header("List-Unsubscribe", f"{unsubscribe_url}")
msg.add_header("List-Unsubscribe", f"<{unsubscribe_url}>")
msg.add_header("List-Unsubscribe-Post", "List-Unsubscribe=One-Click")

plain_part = MIMEText(text, "plain")
Expand Down

0 comments on commit 929619a

Please sign in to comment.