feat(email): log when an email is queued for delivery #309
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-309-log-email-queued"
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?
All bunyip emails funnel through
EmailService::send_email(crates/bunyip-domain/src/services/email.rs), which logged onlyEmail sent successfullyafter the transport returned. A send that failed left no record that a delivery had even been attempted, and there was no "queued" signal at all (emails are sent synchronously; there is no separate queue).This adds an
Email queued for deliveryinfo log at the transport handoff, right beforetransport.send(email), carrying the sameto+subjectfields as the existing sent line. It brackets every send so an attempt is always visible in the logs even when the send errors, and it covers every email kind (welcome, verify, password reset, magic link, email-change, payment-failed, ...) because they all route throughsend_email. No new PII: the recipient address is already logged at INFO in the sent line. Dev-mode (no transport) keeps its existingEmail not sent (dev mode)line.Verified:
just check-containergreen (fmt + clippy + workspace lib tests, no warnings).Closes BUNYIP-309.