Skip to content

🪲 BUG-#69: Forward port/ssl overrides through auto-discovery factories - #79

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

🪲 BUG-#69: Forward port/ssl overrides through auto-discovery factories#79
FernandoCelmer merged 2 commits into
developfrom
feature/69

Conversation

@FernandoCelmer

Copy link
Copy Markdown
Member

Summary

  • Email(port=..., ssl=...) kwargs are now forwarded through EmailFactories.from_address and EmailFactories.from_env, so they override the values returned by resolve_imap_host
  • Switched port/ssl defaults to Optional sentinel (None) on both Email.__init__ and the factories — distinguishes "user passed default" from "user did not pass anything"
  • Tests cover: override applied, omission keeps discovered values

Closes #69

Test plan

  • pytest tests/test_email.py — 29 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

Correct fix. Switching port/ssl defaults to Optional[None] cleanly distinguishes "user passed default" from "user passed nothing" — the only sound way to detect intent in Python without sentinels. Forwarded through both from_address and from_env, and Email._resolve propagates the kwargs to every auto-discovery branch.

Test coverage proves both directions: override applied, omission keeps discovered values. With #74 already in, this is what unblocks Email("u@hostinger.com", "pw", port=2143, ssl=False) style configs end-to-end.

Closes #69.

@FernandoCelmer
FernandoCelmer merged commit 3c91b80 into develop May 17, 2026
10 checks passed
@FernandoCelmer
FernandoCelmer deleted the feature/69 branch May 17, 2026 21:52
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