Peppermint-Lab / peppermint

An open source ticket management & help desk solution. A zendesk/freshdesk alternative
https://peppermint.sh
Other
1.77k stars 181 forks source link

Email queue, IMAP issue parsing emails, EmailText.split("\n"); #297

Closed Odiesinfosec closed 3 months ago

Odiesinfosec commented 3 months ago

Hello, I am unable to retrieve emails from the queue. I am authenticated to the email queue via IMAP. can receive the email, but fail to parse the body and create a ticket due to a typerror. mail server is exchange2016, (IMAP4) peppermint release 0.4.6 here is the relevant log, peppermint | Done fetching all messages! peppermint | Marked as read! peppermint | Connection ended peppermint | from { peppermint | value: [ peppermint | { peppermint | address: 'me@redacted.com', peppermint | name: 'me' peppermint | } peppermint | ], peppermint | html: 'me <me@redacted.com>', peppermint | text: '"me" me@redacted.com' peppermint | } peppermint | /apps/api/dist/lib/imap.js:16 peppermint | const lines = emailText.split("\n"); peppermint | ^ peppermint | TypeError: Cannot read properties of undefined (reading 'split') peppermint | at parseEmailContent (/apps/api/dist/lib/imap.js:16:29) peppermint | at /apps/api/dist/lib/imap.js:80:56 peppermint | at /apps/api/node_modules/mailparser/lib/simple-parser.js:106:17 peppermint | at Immediate.processNext (/apps/api/node_modules/mailparser/lib/mail-parser.js:1078:24) peppermint | at process.processImmediate (node:internal/timers:478:21) peppermint | Node.js v20.11.1

potts99 commented 3 months ago

This is now resolved, new build going out shortly

Odiesinfosec commented 2 months ago

Awesome!! Thanks, you legend!