Hello,
I’d like to propose a change. According to the contribution guide, I’m opening this thread to discuss it first.
I'm a developer using Node-RED in an enterprise environment, where we have CI/CD pipelines, deployments, and multiple environments with many flows and nodes in each.
Currently, the mail nodes (for sending and receiving emails) aren't well-suited for automatic deployment:
-
Both nodes lack a configuration node.
-
You can't set the node’s configuration (such as credentials) via input. (The mail fetch node doesn’t even have an input.)
-
Credentials provided via the UI aren't persisted in the node.
As a result, after each deployment, we have to manually re-enter the credentials in every mail node via the UI - which is quite tedious.
My actual suggestion is to allow setting the configuration of mail nodes - particularly credentials -via input. In my opinion, this has an advantage over using a config node, as it allows for more dynamic behavior. For example, you could fetch emails from different folders or accounts in a rotating or conditional manner.
We’ve already built custom subflows for sending and receiving emails (using nodemailer/imap), but we believe it would be better to propose this as a feature request or pull request (PR) to the mail node itself.
I’d be happy to submit a PR with the necessary changes, if there's interest. If changes to the core mail node aren’t desired, please let me know how I can otherwise achieve persisted credentials.
Greetings,