Skip to content

🪲 BUG-#64: Honor port and ssl flag in ImapClient.connect - #74

Merged
FernandoCelmer merged 2 commits into
developfrom
feature/64
May 17, 2026
Merged

🪲 BUG-#64: Honor port and ssl flag in ImapClient.connect#74
FernandoCelmer merged 2 commits into
developfrom
feature/64

Conversation

@FernandoCelmer

Copy link
Copy Markdown
Member

Summary

  • ImapClient.connect() now uses self.port and switches between imaplib.IMAP4_SSL and imaplib.IMAP4 based on self.ssl
  • Unblocks providers like ProtonMail Bridge (127.0.0.1:1143, ssl=False) and IMAP over STARTTLS on port 143
  • Tests assert correct class + port for ssl=True, ssl=False, and custom SSL ports

Closes #64

Test plan

  • pytest tests/clients/imap/test_connect.py — 3 passed

@FernandoCelmer FernandoCelmer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Code Review

Code issues found: 0

Straightforward and correct. Honors port and ssl flags, type annotation widened to Optional[imaplib.IMAP4] (which is the parent of IMAP4_SSL). Tests assert the exact class + port for ssl=True, ssl=False, and a non-993 SSL port — that's the right matrix.

This unblocks the ProtonMail Bridge entry in providers.py and any user pointing at imap.<host>:143 over STARTTLS.

Closes #64.

@FernandoCelmer
FernandoCelmer merged commit 45505f0 into develop May 17, 2026
11 checks passed
@FernandoCelmer
FernandoCelmer deleted the feature/64 branch May 17, 2026 21:30
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.

1 participant