Skip to content

Commit

Permalink
Add MAIL_SERVICE configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore881 committed Dec 18, 2023
1 parent 6308cab commit 4ae5d08
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion BE/config/.sample-env
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ DB_URI=mongodb+srv://<username>:<password>@<cluster info>.mongodb.net/<database>
JWT_SECRET=
JWT_ALGO=
MAIL_USER=
MAIL_PASS=
MAIL_PASS=
MAIL_SERVICE=
1 change: 1 addition & 0 deletions BE/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
jwtAlgo: process.env.JWT_ALGO,
apiPrefix: '/api',
mail: {
service: process.env.MAIL_SERVICE,
id: process.env.MAIL_USER,
pass:process.env.MAIL_PASS
},
Expand Down
2 changes: 1 addition & 1 deletion BE/services/mailer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const nodemailer = require('nodemailer')
const config = require('../config');

const credentials = {
service: 'gmail',
service: config.mail.service,
auth: {
user: config.mail.id,
pass: config.mail.pass
Expand Down

0 comments on commit 4ae5d08

Please sign in to comment.