App.js cannot read environmental variables

Hi! I’m doing something like this for the first time, so please forgive me if this is something simple I missed. I’m trying to use environmental variables for NodeMailer for my website, and although it works on my local host if I were to directly use the values instead of the keys, I believe that my app in Render is unable to access the variables I set up. I tried both a variable group and just adding them one by one. Am I supposed to run some sort of command?

HI there,

Thanks for reaching out.

Can you provide a little more information here, are you seeing any errors in the Web Service “Logs” tab when you try and send email? Could you share some more details, e.g. any logs/errors/output, service name/ID, specific URLs, etc. to show the issue you’re experiencing.

Thanks

Alan

Hi mercedes,
Is this problem with a static site? I’m pretty sure that environment variables are only available at build time for static sites.
Cheers,
Paul