-
Notifications
You must be signed in to change notification settings - Fork 609
Description
Which node are you reporting and issue on?
node-red-node-email
What are the steps to reproduce?
Configure an outgoing email using smtp.gmail.com, but running on a IPv4 only network (for example, wifi router or computer without IPv6 enabled). Because smtp.gmail.com answers with a AAAA record first, and that's the one used, the connection will fail.
What happens?
Error: connect EHOSTUNREACH 2607:f8b0:4002:c0f::6d:465 - Local (:::49175)
at internalConnect (node:net:1110:16)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:472:18)
at node:net:1356:9
at process.processTicksAndRejections (node:internal/process/task_queues:84:11)
What did you expect to happen?
After IPv6 connection fails, try the next DNS record which would be an IPv4 address, and then it would succeed. I know this is possible because I was able to patch nodemailer to skip AAAA records. It may however be not as simple to add an actual retry mechanism to the logic.
Environment
- Node-RED version:4.1.2
- Node.js version: 25.2.1
- npm version: n/a
- Platform/OS: mac/macos/brew
- Browser: firefox