Add ignoreUnauthorized option.
This commit is contained in:
@@ -50,6 +50,10 @@ export const configurationSchema = {
|
|||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
description: 'whether the connection should use SSL'
|
description: 'whether the connection should use SSL'
|
||||||
},
|
},
|
||||||
|
ignoreUnauthorized: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'ignore certificates error (e.g. self-signed certificate)'
|
||||||
|
},
|
||||||
|
|
||||||
// FIXME: xo-web does not support edition of too nested
|
// FIXME: xo-web does not support edition of too nested
|
||||||
user: {
|
user: {
|
||||||
@@ -103,6 +107,7 @@ class TransportEmailPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure ({
|
configure ({
|
||||||
|
ignoreUnauthorized,
|
||||||
transport: {
|
transport: {
|
||||||
user,
|
user,
|
||||||
password,
|
password,
|
||||||
@@ -110,6 +115,13 @@ class TransportEmailPlugin {
|
|||||||
},
|
},
|
||||||
...conf
|
...conf
|
||||||
}) {
|
}) {
|
||||||
|
if (ignoreUnauthorized != null) {
|
||||||
|
(
|
||||||
|
transportConf.tls ||
|
||||||
|
(transportConf.tls = {})
|
||||||
|
).rejectUnauthorized = !ignoreUnauthorized
|
||||||
|
}
|
||||||
|
|
||||||
transportConf.auth = { user, pass: password }
|
transportConf.auth = { user, pass: password }
|
||||||
|
|
||||||
const transport = createTransport(transportConf)
|
const transport = createTransport(transportConf)
|
||||||
|
|||||||
Reference in New Issue
Block a user