Node red v3.0.2 enabled via PM2 on a Mac Mini running OSX Monterey
I have installed node-red-node-email (v1.18.4). My email node is configured as follows:
Use secure connection: disabled
TLS option: enabled or disabled....same error regardless
It takes about 5 seconds to return an error and this is the error message:
Error: Invalid HELO. response=501 5.5.4 Invalid domain name [LNXP123CA0019.GBRP123.PROD.OUTLOOK.COM]: 501 5.5.4 Invalid domain name [LNXP123CA0019.GBRP123.PROD.OUTLOOK.COM]
at SMTPConnection._actionHELO (/Users/auser/.node-red/node_modules/node-red-node-email/node_modules/nodemailer/lib/smtp-connection/index.js:1336:27)
at SMTPConnection._processResponse (/Users/auser/.node-red/node_modules/node-red-node-email/node_modules/nodemailer/lib/smtp-connection/index.js:953:20)
at SMTPConnection._onData (/Users/auser/.node-red/node_modules/node-red-node-email/node_modules/nodemailer/lib/smtp-connection/index.js:755:14)
at Socket.SMTPConnection._onSocketData (/Users/auser/.node-red/node_modules/node-red-node-email/node_modules/nodemailer/lib/smtp-connection/index.js:193:44)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Socket.Readable.push (node...
That is the domain name that is invalid. This looks like a Microsoft related issue. If you do a google search using Invalid domain name [LNXP123CA0019.GBRP123.PROD.OUTLOOK.COM] you'll see some similar issues. You are going to have to read them and try what they say.
My mac mini had a short name on my network e.g. "abcd.local". For some reason (router, local dns table or the mac) my domain became "httpabcd". I remember seeing (google search for error) that http at the begining of a domain name is an issue for ms email servers. I simply changed my mac's sharing name to abcdefgh.local and flushed my router's arp cache.