Repository navigation
fix(mail): remove lettre pool (60s stale-connection timeout) + resend button feedback - #108
Merged
Merged
Conversation
…TP timeout + resend button feedback Rant 2026-08-21T14:08:03: verification-code resend intermittently hung 60s — lettre pool reuses connections dropped by the SMTP server (Gmail closes idle connections), causing Kind(TimedOut). - Cargo.toml: drop lettre 'pool' feature — each send opens a fresh connection (code sends are rate-limited 60s, no pool needed) - mail.rs: explicit 15s SMTP timeout so a send never hangs the full default 60s - ui: resend button shows 'Sending…' + disabled while sending, restores text after (silent 60s feedback gap eliminated); success/error toasts already present
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes intermittent 60s SMTP timeouts on verification-code sends (resend button appeared unresponsive). Root cause per host test: lettre's
poolfeature makesSmtpTransport::relay(...).build()reuse pooled connections — after the SMTP server (Gmail) closes an idle connection, the pool hands out the stale connection and the send hangs 60s (Kind(TimedOut)).poolfeature — eachsend()now opens a fresh connection. Code sends are rate-limited (60s per recipient), so a pool provides no benefit here.Sending…and is disabled while sending, restoring its text afterwards — the silent 60s feedback gap is eliminated. Success/error toasts already existed (verify.sent/ mapped error).Related Issue
Host bug report rant
2026-08-21T14:08:03(project: aitokenpool) — no GitHub issue number.Changes
Cargo.toml/Cargo.lock: lettrepoolfeature removedsrc/mail.rs: 15s SMTP timeoutui/js/app.js: resend button sending-state feedbackui/js/i18n.js: newverify.sendingkey (zh/en)Tests
cargo test— 132 passed; 0 failedcargo fmt --check— passcargo clippy --all-targets— no new warningsnode --checkon modified JS filesChecklist
fix/...)