emailjs / emailjs-imap-client

Low-level JS IMAP client for all your IMAP needs.
MIT License
553 stars 122 forks source link

TypeError: (0 , _ramda.pathOr)(...).trim is not a function #204

Open petercraft opened 5 years ago

petercraft commented 5 years ago

const emailParams = ['uid', 'envelope', 'body[]']; await client.listMessages(crawlerFolder, queryEmailsNumber, emailParams, {valueAsString: false});

Throws an error

TypeError: (0 , _ramda.pathOr)(...).trim is not a function

While without "{valueAsString: false}" it is working fine.
Unfortunately some email body (strings) I'm listing are encoded with base64, some are in quoted printable, so I want to have Uint8Array to be able to decode body my way. With this error its impossible at the moment.

Seems like this part is failing:

emailjs-imap-client/dist/command-parser.js:186