Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Commit 3129035

Browse files
committed
Adding another SMTP env value
For STMP sending, we have to have the correct from address. However gmail ignores this value for some reason, hence the dummy value. So, if the value is defined we'll use it. If it isn't, we default to the old dummy value.
1 parent 7e1d1f5 commit 3129035

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/routes/forgot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ router.post('/', function(req, res, next)
3434
{
3535
var mailOptions = {
3636
to: user.email,
37-
37+
from: process.env.SMTP_FROM_USER || '[email protected]',
3838
subject: 'Node.js Password Reset',
3939
text: 'You are receiving this because you (or someone else) have requested the reset of the password for your account.\n\n' +
4040
'Please click on the following link, or paste this into your browser to complete the process:\n\n' +
@@ -64,4 +64,4 @@ router.get('/', function(req, res)
6464
});
6565
});
6666

67-
module.exports = router;
67+
module.exports = router;

app/routes/reset.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ router.post('/:token', function(req, res)
5555
{
5656
var mailOptions = {
5757
to: user.email,
58-
58+
from: process.env.SMTP_FROM_USER || '[email protected]',
5959
subject: 'Your password has been changed',
6060
text: 'Hello,\n\n' +
6161
'This is a confirmation that the password for your account ' + user.email + ' has just been changed.\n'
@@ -73,4 +73,4 @@ router.post('/:token', function(req, res)
7373
});
7474
});
7575

76-
module.exports = router;
76+
module.exports = router;

0 commit comments

Comments
 (0)