Skip to content

Commit

Permalink
fix: fixed issue with reading emails from specific IMAP servers (Xeams)
Browse files Browse the repository at this point in the history
  • Loading branch information
umanamente committed Dec 5, 2024
1 parent a91e02f commit 5687b2e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 109 deletions.
6 changes: 5 additions & 1 deletion nodes/Imap/operations/email/functions/EmailGetList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const getEmailsListOperation: IResourceOperationDef = {

context.logger?.info(`Getting emails list from ${mailboxPath}`);

await client.mailboxOpen(mailboxPath, { readOnly: true });
await client.mailboxOpen(mailboxPath);

var searchObject = getEmailSearchParametersFromNode(context, itemIndex);

Expand Down Expand Up @@ -170,6 +170,10 @@ export const getEmailsListOperation: IResourceOperationDef = {
fetchQuery.bodyStructure = true;
}

// log searchObject and fetchQuery
context.logger?.debug(`Search object: ${JSON.stringify(searchObject)}`);
context.logger?.debug(`Fetch query: ${JSON.stringify(fetchQuery)}`);

// wait for all emails to be fetched before processing them
// because we might need to fetch the body parts for each email,
// and this will freeze the client if we do it in parallel
Expand Down
140 changes: 33 additions & 107 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"n8n-workflow": "*"
},
"dependencies": {
"imapflow": "^1.0.164",
"imapflow": "^1.0.169",
"mailparser": "^3.7.1"
}
}

0 comments on commit 5687b2e

Please sign in to comment.