Skip to content

fix: replace Resend with Nodemailer SMTP #61

Merged
Atanu2k4 merged 2 commits into
sanks011:masterfrom
Atanu2k4:master
Jun 1, 2026
Merged

fix: replace Resend with Nodemailer SMTP #61
Atanu2k4 merged 2 commits into
sanks011:masterfrom
Atanu2k4:master

Conversation

@Atanu2k4

@Atanu2k4 Atanu2k4 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the Resend SDK entirely and switches email delivery to Nodemailer via SMTP (Gmail).
Fixes OTP email failures on Railway caused by IPv6 routing issues on outbound SMTP connections.

Related issue

Fixes #60

Changes

  • Removed resend package from dependencies (npm uninstall resend)
  • Replaced Resend API calls in lib/notifyMail.ts with Nodemailer SMTP transport
  • Added family: 4 to force IPv4 on Railway (fixes ENETUNREACH on IPv6 SMTP addresses)
  • Added connection/greeting/socket timeouts for cloud environment stability
  • Added tls: { rejectUnauthorized: false } to handle Railway TLS edge cases
  • Rewrote lib/validateConfig.ts to validate SMTP_HOST, SMTP_USER, SMTP_PASS instead of RESEND_* env vars
  • Deleted compiled lib/validateConfig.js (stale Resend artifact)
  • Updated README.md — tech stack, prerequisites, and env var examples now reflect SMTP/Nodemailer

Testing

  • Verified OTP email delivery works locally via Gmail SMTP on port 587
  • Confirmed resend package is fully removed from node_modules and package.json
  • Railway deployment uses SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS env vars (no Resend keys needed)

Checklist

  • Title follows the repository PR format
  • The issue is linked with Fixes #60
  • Testing notes are included

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Validation Passed

Your PR title and description meet all requirements:

3 similar comments
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Validation Passed

Your PR title and description meet all requirements:

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Validation Passed

Your PR title and description meet all requirements:

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Validation Passed

Your PR title and description meet all requirements:

@Atanu2k4 Atanu2k4 merged commit b7defc0 into sanks011:master Jun 1, 2026
4 checks 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.

Remove the Resend codes, files

1 participant