Skip to content

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

@Odiesinfosec

Description

@Odiesinfosec

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: '[email protected]',
peppermint | name: 'me'
peppermint | }
peppermint | ],
peppermint | html: 'me <[email protected]>',
peppermint | text: '"me" [email protected]'
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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions