Skip to content

Catch all exceptions during SMTP client initialization#180

Merged
lavr merged 1 commit intomasterfrom
fix/issue-179-catch-all-init-exceptions
Mar 30, 2026
Merged

Catch all exceptions during SMTP client initialization#180
lavr merged 1 commit intomasterfrom
fix/issue-179-catch-all-init-exceptions

Conversation

@lavr
Copy link
Copy Markdown
Owner

@lavr lavr commented Mar 30, 2026

Summary

  • Broaden the except clause in SMTPClientWithResponse.__init__ from SMTPAuthenticationError to Exception, so the connection is cleaned up when starttls() or ehlo_or_helo_if_needed() fails as well.

Fixes #179

Broaden the except clause from SMTPAuthenticationError to Exception
so the connection is cleaned up when starttls() or
ehlo_or_helo_if_needed() fails as well.

Fixes #179
@lavr lavr merged commit cebe972 into master Mar 30, 2026
4 checks passed
@lavr lavr deleted the fix/issue-179-catch-all-init-exceptions branch March 30, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Catch all exceptions during SMTP client initialization, not just SMTPAuthenticationError

1 participant