Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
3dbc8d04
Commit
3dbc8d04
authored
Mar 06, 2020
by
Rosanny Sihombing
Browse files
separate nodemailer initialization
parent
5e20b29a
Changes
1
Hide whitespace changes
Inline
Side-by-side
routes/mailer.js
0 → 100644
View file @
3dbc8d04
const
nodemailer
=
require
(
'
nodemailer
'
)
var
env
=
process
.
env
.
NODE_ENV
||
'
development
'
;
const
config
=
require
(
'
../config/config
'
)[
env
]
var
smtpTransport
=
nodemailer
.
createTransport
({
host
:
config
.
mailer
.
host
,
secureConnection
:
config
.
mailer
.
secureConnection
,
port
:
config
.
mailer
.
port
,
auth
:
{
user
:
config
.
mailer
.
authUser
,
pass
:
config
.
mailer
.
authPass
},
tls
:
{
ciphers
:
config
.
mailer
.
tlsCiphers
}
});
var
mailOptions
=
{
to
:
""
,
from
:
config
.
mailer
.
from
,
subject
:
""
,
text
:
""
};
var
mailer
=
{
transport
:
smtpTransport
,
options
:
mailOptions
}
module
.
exports
=
mailer
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment