Skip to content

Conversation

@100NikhilBro
Copy link
Contributor

🔧 Resend Email Service Migration

Resolves: #1247


📝 Summary

This pull request completes the migration of our email service from Nodemailer to Resend.
This change addresses deliverability and maintenance concerns discussed in issue #1247 by leveraging Resend's:

  • Modern API
  • Managed infrastructure
  • Improved email authentication (SPF/DKIM)

⚙️ Changes Implemented

1️⃣ Replaced Email Service

  • Deleted the old config/nodemailer.js file.
  • Created a new config/resend.js service file that securely initializes the Resend client using an API key.

2️⃣ Updated Environment Configuration

  • Removed legacy ADMIN_EMAIL and ADMIN_PASSWORD variables from config/env.js.
  • Added new RESEND_API_KEY variable to handle authentication with Resend.
  • Updated .env.example to reflect these new requirements.

3️⃣ Refactored Controller Logic

  • Updated invitationToCollaborate controller to use the new Resend service.
  • Switched to modern async/await syntax instead of callbacks, simplifying the code and improving error handling.

4️⃣ Added Dependencies

  • Added resend to package.json.

  1. Sign up for a free account at Resend.com.
  2. Verify a sending domain as per Resend instructions.
  3. Create a new API key.
  4. Add the new key and your verified email to your local .env file:
# .env
RESEND_API_KEY="re_YourSecretKeyGoesHere"
ADMIN_EMAIL="you@your-verified-domain.com"

@vercel
Copy link

vercel bot commented Oct 9, 2025

@100NikhilBro is attempting to deploy a commit to the avdheshvarshney's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Oct 9, 2025

Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

@100NikhilBro
Copy link
Contributor Author

Hi @Avdhesh-Varshney, I’ve updated the setup from Nodemailer to Resend. Please review the changes and let me know if you have any suggestions or improvements. I’ll make the necessary updates before creating the PR.

Copy link
Member

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the indentation of your editor to be 2-space. This should not be repeated everytime.

@100NikhilBro
Copy link
Contributor Author

Hi @Avdhesh-Varshney, sorry for missing the 2-space indentation this time — I’ll make sure to follow it properly next time. 🙏
I’ve also made the requested changes. Please review the PR, and if everything looks good, kindly merge it.

@vercel
Copy link

vercel bot commented Oct 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
code-a2z-server Ready Ready Preview Comment Oct 11, 2025 0:31am

Copy link
Member

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved and Working 🎉
Thanks for this amazing contribution 😄

@Avdhesh-Varshney Avdhesh-Varshney merged commit 1cc73a1 into Code-A2Z:main Oct 12, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discussion] Consider migrating from Nodemailer to Resend for improved email delivery

3 participants