Skip to content

Commit

Permalink
fix(Email Trigger (IMAP) Node): improve connection handling and crede…
Browse files Browse the repository at this point in the history
…ntials (#4393)

* adds EmailReadImapV2 with fixes
  • Loading branch information
flipswitchingmonkey authored Oct 24, 2022
1 parent 779b0d5 commit 1a37f00
Show file tree
Hide file tree
Showing 4 changed files with 1,327 additions and 610 deletions.
27 changes: 27 additions & 0 deletions packages/nodes-base/credentials/Imap.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,32 @@ export class Imap implements ICredentialType {
type: 'boolean',
default: true,
},
{
displayName: 'Allow Self-Signed Certificates',
name: 'allowUnauthorizedCerts',
type: 'boolean',
description: 'Whether to connect even if SSL certificate validation is not possible',
default: false,
},
];
}

export interface ICredentialsDataImap {
host: string;
port: number;
user: string;
password: string;
secure: boolean;
allowUnauthorizedCerts: boolean;
}

export function isCredentialsDataImap(candidate: unknown): candidate is ICredentialsDataImap {
const o = candidate as ICredentialsDataImap;
return (
o.host !== undefined &&
o.password !== undefined &&
o.port !== undefined &&
o.secure !== undefined &&
o.user !== undefined
);
}
Loading

0 comments on commit 1a37f00

Please sign in to comment.