From 929619ab7fa642d981479e876f83ff789dc2054b Mon Sep 17 00:00:00 2001 From: Nikita Melkozerov Date: Fri, 8 Mar 2024 09:41:22 +0000 Subject: [PATCH] wrap unsubscribe url in <> --- fixbackend/notification/email/email_sender.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fixbackend/notification/email/email_sender.py b/fixbackend/notification/email/email_sender.py index 4bac60cd..f74fa63a 100644 --- a/fixbackend/notification/email/email_sender.py +++ b/fixbackend/notification/email/email_sender.py @@ -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 = "" @@ -89,7 +89,7 @@ def send_email() -> None: msg["From"] = "noreply@fix.security" 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")