paisable icon indicating copy to clipboard operation
paisable copied to clipboard

feat: Send Welcome email on user signup

Open archa8 opened this issue 1 year ago • 4 comments

Problem or Need

Currently, when a new user successfully registers for an account, the only feedback is a redirect to the dashboard. There is no official confirmation or welcome message sent to the user.

Proposed Solution

Implement an automated email service on the backend that sends a welcome email to a new user immediately after they successfully create an account.

Expected Behavior

  1. A new user fills out the registration form and submits it successfully.
  2. The user's account is created in the database.
  3. Simultaneously, the backend server sends an email to the address the user provided.
  4. The email has a clear subject line like "Welcome to Paisable!" and contains a friendly message confirming their account creation.

Benefits

  • Improved User Onboarding: Provides a professional and welcoming first impression, making the user feel valued from the start.
  • Increased Engagement: Reinforces the brand and encourages the user to begin using the application.
  • Implicit Email Validation: A successful email delivery provides a basic confirmation that the user has provided a valid, working email address.

Possible Implementation

  • Backend:
    • Install a Node.js email-sending library: npm install nodemailer.
    • Add email service credentials (e.g., for a Gmail "App Password") to the backend .env file (EMAIL_USER, EMAIL_PASS).
    • Create a reusable email service in a new file, backend/utils/sendEmail.js. This service will configure the Nodemailer "transporter" and contain the main logic for sending emails.
    • In the signup function within authController.js, after a user is successfully created, call the new sendEmail service to send the welcome email.

Alternatives Considered

  • No Email: This is the current behavior but provides a less professional experience.
  • Third-Party Services: For a production environment, a dedicated transactional email service like SendGrid or Mailgun would be a more robust alternative to Gmail. However, for a portfolio project and ease of setup, using Nodemailer with Gmail is an excellent and sufficient solution.

Additional Notes

  • The email sending process should not block the user registration response. It should be a "fire-and-forget" operation so that a failure in the email service does not prevent a user's account from being created.

archa8 avatar Sep 27 '25 15:09 archa8

Hi, I can fix this issue, can you assign it to me.

onipinaka avatar Sep 27 '25 18:09 onipinaka

Assigned @onipinaka Good luck!

archa8 avatar Sep 28 '25 02:09 archa8

Hi @archa8, I’d like to work on implementing the automated welcome email for new users.
I plan to use Nodemailer to send a friendly email after successful registration, following a fire-and-forget approach so registration isn’t blocked. Could you please assign this issue to me?

akshatxq avatar Sep 30 '25 06:09 akshatxq

Assign these to me if not yet done

PrathmeshDesai avatar Oct 13 '25 18:10 PrathmeshDesai