You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2026/10/06 13:59:52 UTC
(tooling-trusted-releases) branch sbp updated: Add comments describing email subject value validation
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new 5c49bc04 Add comments describing email subject value validation
5c49bc04 is described below
commit 5c49bc049168c0f32d320162c811df9dde852987
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Tue Oct 6 14:53:12 2026 +0100
Add comments describing email subject value validation
---
atr/mail.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/atr/mail.py b/atr/mail.py
index 338b9240..dcbc467f 100644
--- a/atr/mail.py
+++ b/atr/mail.py
@@ -129,6 +129,8 @@ async def send(msg_data: Message, category: MailFooterCategory) -> tuple[str, li
msg["To"] = headerregistry.Address(username=to_local, domain=to_domain)
if msg_data.email_cc:
msg["Cc"] = _address_header(msg_data.email_cc)
+ # SMTPUTF8 rejects multiline subjects with ValueError.
+ # The handler below prevents these messages from being sent.
msg["Subject"] = msg_data.subject
msg["Date"] = utils.formatdate(usegmt=True)
msg["Message-ID"] = f"<{mid}>"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org