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:
To: myemail@me.com
Server: smtp.office365.com
Port: 5887
Use secure connection: disabled
Userid: myemail@me.com
Password: abc123
TLS option: enabled or disabled....same error regardless
When you run the flow, does it fail right away?
add a catch node connected to a debug node (set to display the complete msg object) and see if that shows anything,
I'm testing on a Mac mini Ventura
[update] I just ran using the exact credentials you show (yes I know the user iid and password are fake) and get this in return from a catch node:
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.
While my email setup and your may be totally different, may be once you can try with the following settings. This is working for me for many days without any issue.
pls note: smtp.office365.com works too. the only major change i see in your and mine is the port 587 vs 5887 hope it is not just a typo.
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.