Do not set credentials if they are undefined.

This commit is contained in:
Julien Fontanet 2016-03-16 14:03:28 +01:00
parent 48a0623ded
commit dbe828097c

View File

@ -122,7 +122,9 @@ class TransportEmailPlugin {
).rejectUnauthorized = !ignoreUnauthorized
}
transportConf.auth = { user, pass: password }
if (user != null && password != null) {
transportConf.auth = { user, pass: password }
}
const transport = createTransport(transportConf)
transport.use('compile', markdownCompiler)