Email error "Error: Invalid HELO. response=501 5.5.4 Invalid domain name"

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:
Port: 5887
Use secure connection: disabled
Password: abc123
TLS option: enabled or disabled....same error regardless

Any troubleshooting pointers would be very welcom

You sure about If I enter in a browser I get a ā€˜server not foundā€™ msg.

Thank you for looking at this ....... yes here is an extract of microsoft's website

oops, I used 360 instead of 365 :flushed:

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:
Screenshot 2023-01-07 at 4.59.46 PM

Where are you seeing the invalid HELO?

Thank you.... I will test tomorrow and revert

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...

Did you add a catch node like I suggested? What you posted looks like it came from a log

Thank you. Yes the text I posted is the "stack" section of the debug node connected to a "catch all" node.

Is this OK ? I have not used catch all before

Is that the domain you are trying to use?

Maybe !!! I guess that's an internal Microsoft reference, but I have my own domain registered with MS.

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.

Sorry I can't give you more help.

Thank you for your help. I did do that before I posted here.... i will search harder :slight_smile: Thank you once again

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: 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.



Yes.... 5887 was a typo. I use 587.

I get the same error message using

I think this must be a Microsoft issue as my settings (apart from user name and password) are exactly the same as yours.

Thank you for trying to help, very kind.


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.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.