Email login/password setup

I am not sure what it is that you don't understand.

Well, I think the point that @calixtoemilio is trying to make is that for MQTT node the password can be part of the imported flow, whereas for email it is not.

His export shows:

The exports of the eMail node, which we created earlier, showed no field for password.

Maybe there is another way to properly pass credentials to a freshly created docker container of node-red?

1 Like

I make changes to the code, then download it via export into my desktop. This flow.json is saved into git repository. Then the linux host pull the code from the git repository, and create a new container to be deployed. btw, this instance runs in multiple hosts in parallel, hence the new container creation process is repeated after a new code version.

Challenge:

How to persistently pass email username and password into the email node upon creating a new container with a new code, which is passed via flow.json while Dockerfile inject environment variables into the new container.

I see 2 options: having the email to store the environment variable, or injecting email config params into the email node. Or the 3rd way I am missing :fearful:

Or you just add the credentials to the import :slight_smile:

Email node uses a credentials JSON.

Just tried it, and for me it imports with credentials.

[
    {
        "id": "0f3dbcb16a5fecb8",
        "type": "e-mail in",
        "z": "f6f2187d.f17ca8",
        "name": "",
        "protocol": "IMAP",
        "server": "imap.gmail.com",
        "useSSL": true,
        "autotls": "required",
        "port": "993",
        "authtype": "BASIC",
        "credentials": {"userid":"${EMAIL_USER}", "password":"${EMAIL_PASSWORD}"},
        "saslformat": true,
        "token": "oauth2Response.access_token",
        "box": "wss_export",
        "disposition": "None",
        "criteria": "_msg_",
        "repeat": "300",
        "fetch": "trigger",
        "inputs": 1,
        "x": 510,
        "y": 500,
        "wires": [
            []
        ]
    }
]
1 Like

Interesting!!, will try that, not an elegant way, but effective enough for my development cycle.

Are you exporting the full set of flows? If so then put your full .node-red folder in git, except for node_modules, and it will just go.

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