mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(EmailReadImap Node): Improve handling of network problems (#3406)
* ⚡ fix * ⚡ tlsOptions fix
This commit is contained in:
@@ -433,10 +433,18 @@ export class EmailReadImap implements INodeType {
|
||||
},
|
||||
};
|
||||
|
||||
const tlsOptions: IDataObject = {};
|
||||
|
||||
if (options.allowUnauthorizedCerts === true) {
|
||||
config.imap.tlsOptions = {
|
||||
rejectUnauthorized: false,
|
||||
};
|
||||
tlsOptions.rejectUnauthorized = false;
|
||||
}
|
||||
|
||||
if (credentials.secure) {
|
||||
tlsOptions.servername = credentials.host as string;
|
||||
}
|
||||
|
||||
if (!_.isEmpty(tlsOptions)) {
|
||||
config.imap.tlsOptions = tlsOptions;
|
||||
}
|
||||
|
||||
// Connect to the IMAP server and open the mailbox
|
||||
@@ -456,9 +464,8 @@ export class EmailReadImap implements INodeType {
|
||||
}
|
||||
} else {
|
||||
Logger.error('Email Read Imap node encountered a connection error', { error });
|
||||
}
|
||||
|
||||
this.emitError(error);
|
||||
}
|
||||
});
|
||||
return conn;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user