EmailSend don't set credentials if there are none.

This commit is contained in:
Leo 2019-11-03 19:15:54 +01:00
parent 644b5455c9
commit 56dae5f11a

View file

@ -139,13 +139,16 @@ export class EmailSend implements INodeType {
host: credentials.host as string, host: credentials.host as string,
port: credentials.port as number, port: credentials.port as number,
secure: credentials.secure as boolean, secure: credentials.secure as boolean,
// @ts-ignore
auth: {
user: credentials.user,
pass: credentials.password,
}
}; };
if(credentials.user || credentials.password) {
// @ts-ignore
connectionOptions.auth = {
user: credentials.user,
pass: credentials.password
};
}
if (options.allowUnauthorizedCerts === true) { if (options.allowUnauthorizedCerts === true) {
connectionOptions.tls = { connectionOptions.tls = {
rejectUnauthorized: false rejectUnauthorized: false