File tree Expand file tree Collapse file tree 1 file changed +9
-22
lines changed
Expand file tree Collapse file tree 1 file changed +9
-22
lines changed Original file line number Diff line number Diff line change 11const config = require ( '../config' ) ;
22const nodemailer = require ( 'nodemailer' ) ;
33
4- let mailConfig = { } ;
5-
6- if ( process . env . NODE_ENV === 'production' ) {
7- mailConfig = {
8- host : config . MAIL_HOST ,
9- port : config . MAIL_PORT ,
10- secure : config . MAIL_SECURE ,
11- auth : {
12- user : config . MAIL_USER ,
13- pass : config . MAIL_PASSWORD ,
14- } ,
15- } ;
16- } else {
17- mailConfig = {
18- host : 'smtp.ethereal.email' ,
19- port : 587 ,
20- auth : {
21- 22- pass : 'fjmhsR8zJQZ3BKQath' ,
23- } ,
24- } ;
25- }
4+ const mailConfig = {
5+ host : config . MAIL_HOST ,
6+ port : config . MAIL_PORT ,
7+ secure : config . MAIL_SECURE ,
8+ auth : {
9+ user : config . MAIL_USER ,
10+ pass : config . MAIL_PASSWORD ,
11+ } ,
12+ } ;
2613
2714const transporter = nodemailer . createTransport ( mailConfig ) ;
2815module . exports = transporter ;
You can’t perform that action at this time.
0 commit comments