Skip to content

[codex] Fix ZeptoMail auth email sending#11

Merged
DebdipWritesCode merged 1 commit into
mainfrom
codex/fix-zeptomail-auth-email
Jun 11, 2026
Merged

[codex] Fix ZeptoMail auth email sending#11
DebdipWritesCode merged 1 commit into
mainfrom
codex/fix-zeptomail-auth-email

Conversation

@rahuliitk

Copy link
Copy Markdown
Contributor

Summary

  • Replace the ZeptoMail SDK usage in the auth mailer with a direct REST fetch call.
  • Derive the REST API endpoint from the existing SMTP_HOST=smtp.zeptomail.in value, while also supporting explicit ZEPTOMAIL_URL / ZEPTOMAIL_TOKEN env vars.
  • Add focused mailer tests for endpoint derivation and controlled transport errors.

Why

The ECS task crash was caused by the ZeptoMail SDK throwing TypeError: resp.json is not a function after an auth email path attempted to send mail. The service itself recovered, but this made email-triggered requests capable of crashing the quickvoice-server container. Calling the ZeptoMail REST API directly gives us predictable error handling and avoids the SDK failure path.

Production env note

No mandatory AWS production env change is required for this PR if SMTP_HOST=smtp.zeptomail.in and SMTP_PASSWORD is already the ZeptoMail Send Mail/API token. Optional cleanup later: add explicit ZEPTOMAIL_URL=api.zeptomail.in and/or ZEPTOMAIL_TOKEN for clarity.

Validation

  • node --import tsx --test apps/server/tests/*.test.ts apps/server/tests/**/*.test.ts

@DebdipWritesCode DebdipWritesCode marked this pull request as ready for review June 11, 2026 10:30
@DebdipWritesCode DebdipWritesCode merged commit 39af7fc into main Jun 11, 2026
1 check passed
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.

2 participants