ReachFive / fake-smtp-server

Fake SMTP Server for email testing
https://www.npmjs.com/package/fake-smtp-server
MIT License
191 stars 81 forks source link

Node 18.12.0 Support: Upgrading mailparser to 3.6.3 #71

Open mabounassif opened 1 year ago

mabounassif commented 1 year ago

I'm getting the following error:

Exception has occurred: TypeError: Cannot set property errored of #<Readable> which has only a getter
  at new MessageSplitter (/<REDACTED>/node_modules/mailsplit/lib/message-splitter.js:28:22)
    at new MailParser (/<REDACTED>/node_modules/mailparser/lib/mail-parser.js:132:25)
    at module.exports (/<REDACTED>/node_modules/mailparser/lib/simple-parser.js:25:18)
    at parseEmail (/<REDACTED>/node_modules/fake-smtp-server/index.js:81:10)
    at SMTPServer.onData (/<REDACTED>/node_modules/fake-smtp-server/index.js:54:5)
    at SMTPConnection.handler_DATA (/<REDACTED>/node_modules/smtp-server/lib/smtp-connection.js:1307:22)
    at SMTPConnection._onCommand (/<REDACTED>/node_modules/smtp-server/lib/smtp-connection.js:497:17)
    at SMTPConnection._parser.oncommand (/<REDACTED>/node_modules/smtp-server/lib/smtp-connection.js:58:52)
    at readLine (/<REDACTED>/node_modules/smtp-server/lib/smtp-stream.js:128:22)
    at SMTPStream._write (/<REDACTED>/node_modules/smtp-server/lib/smtp-stream.js:132:13)

Which was solved with the new version of mailparser

sirhill commented 1 year ago

Thanks. I've made it works by just adding the following to my project package.json

  "resolutions": {
    "fake-smtp-server/mailparser": "^3.6.4"
  }