Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Nodemailer Configuration Duplication and dotenv Placement Issue #466

Open
4 tasks done
Swapnilden opened this issue Jul 23, 2024 · 0 comments
Open
4 tasks done

Comments

@Swapnilden
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Description

  • There is a duplicated configuration of the nodemailer transporter in the code. This can lead to unnecessary redundancy and potential misconfiguration.
  • The dotenv.config() is placed after other module imports, which can result in missing environment variables.

Steps to Reproduce

  1. Run the server.
  2. Check the code and see the duplicate nodemailer transporter setup.
  3. Notice the placement of dotenv.config() after the module imports.

Expected Behaviour

The nodemailer transporter should be configured once, and dotenv.config() should be placed at the top of the file to ensure all environment variables are loaded before other modules are imported.

Potential Fix

  1. Move dotenv.config() to the top of the file.
  2. Remove the duplicate nodemailer transporter configuration from the contactus route.

Record

  • I agree to follow this project's Code of Conduct
  • I'm a GSSOC'24 contributor
  • I want to work on this issue
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

No branches or pull requests

1 participant