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

`punycode` module is deprecated #83

Open PHuhn opened 4 months ago

PHuhn commented 4 months ago

I'm getting the following error when trying to test my .Net 7.0 web application that sends an email, on Windows 10 Pro computer, using version v21.3.0 of node:

>fake-smtp-server --smtp-port 25 --http-port 9888 --max 10
INFO: SMTP server listening on 0.0.0.0:25
(node:29676) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
INFO: HTTP server listening on http://0.0.0.0:9888
ERROR: Uncaught exception: TypeError: Cannot set property errored of #<Readable> which has only a getter
ERROR: Uncaught exception: TypeError: Cannot set property errored of #<Readable> which has only a getter

My unit test fails due to timeout.

PHuhn commented 4 months ago

When I did an NPM INSTALL to a local solution, the mailparser is not 3.6.4

    "node_modules/mailparser": {
      "version": "2.8.1",
      "resolved": "https://registry.npmjs.org/mailparser/-/mailparser-2.8.1.tgz",
      "integrity": "sha512-H/CYAO9dsw6SFNbEGGpZsejVSWDcFlyHjb1OkHUWg0wggUekva1tNc28trB155nSqM8rhtbwTKt//orX0AmJxQ==",
      "dev": true,
      "dependencies": {
        "encoding-japanese": "1.0.30",
        "he": "1.2.0",
        "html-to-text": "5.1.1",
        "iconv-lite": "0.6.2",
        "libmime": "5.0.0",
        "linkify-it": "3.0.2",
        "mailsplit": "5.0.0",
        "nodemailer": "6.4.11",
        "tlds": "1.208.0"
      }
    },

NPM installs version 0.8.0 not 0.8.1 To get it to work, I went to:

C:\Users\<username>\AppData\Roaming\npm\node_modules\fake-smtp-server

and installed:

npm install --save-dev mailparser@3.6.4