feat(email): add plaintext SmtpTls::None for test mail sinks (BUNYIP-150) #219
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/bunyip-150-smtp-plaintext"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add an additive
SmtpTls::Noneplaintext SMTP transport mode toEmailService, so a Mailpit-style test mail sink (plaintext, unauthenticated, port 1025) can receive bunyip-api's outbound mail. Part 1 of BUNYIP-150 (staging E2E mail sink).Why
EmailServicepreviously supported onlyImplicit(465) andStarttls(587), both of which require TLS. The E2E email-driven flows (password reset, magic link, email-change confirmation) cannot be tested without a sink that the suite can read, and the standard sink (Mailpit) speaks plaintext SMTP. This arm is the mechanism that lets staging bunyip-api deliver into that sink.Change
crates/bunyip-domain/src/config.rs: addSmtpTls::None;SMTP_TLS=noneparses to it; default port 1025.crates/bunyip-domain/src/services/email.rs: build a no-TLS, no-credentials transport via lettrebuilder_dangerousfor theNonearm. Two#[tokio::test]constructor tests (None + a regression guard on Implicit).Safety
Additive and prod-safe: production never sets
SMTP_TLS=noneand stays onImplicit. Plaintext is intended only for an internal-network test sink. Also enables a local-dev Mailpit.Verification
just check-containergreen: fmt + clippy (-D warnings) + workspace--libtests, including the two new email-transport tests.Part of BUNYIP-150
This is the first of three PRs. Next: the docker-repo Mailpit fragment + staging SMTP repoint, then the e2e suite changes (which merge last, once staging is live). See the issue for the full sequence.
🤖 Generated with Claude Code
Pull request closed