This is an automated email from the ASF dual-hosted git repository. wave pushed a commit to branch add-starttls-for-smtp in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 392a47a8c4eb1ec50c6d3afadd51b4706904bdf0 Author: Dave Fisher <[email protected]> AuthorDate: Wed Mar 4 15:24:57 2026 -0800 Add start_tls to smtp connection --- atr/mail.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atr/mail.py b/atr/mail.py index f15e3c61..492cbc6e 100644 --- a/atr/mail.py +++ b/atr/mail.py @@ -135,7 +135,9 @@ async def _send_via_relay(from_addr: str, to_addr: str, msg_bytes: bytes) -> Non context = ssl.create_default_context() context.minimum_version = ssl.TLSVersion.TLSv1_2 - smtp = aiosmtplib.SMTP(hostname=_MAIL_RELAY, port=_SMTP_PORT, timeout=_SMTP_TIMEOUT, tls_context=context) + smtp = aiosmtplib.SMTP( + hostname=_MAIL_RELAY, port=_SMTP_PORT, timeout=_SMTP_TIMEOUT, tls_context=context, start_tls=True + ) await smtp.connect() log.info(f"Connected to {smtp.hostname}:{smtp.port}") await smtp.ehlo() --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
