I have actually utilized Node to establish a call type on my Following internet site, as well as I’m presently safeguarding info by utilizing ecological variables saved in a .env.local data.
When I hardcode the info, the call type sends out the e-mail with no concerns.
Nevertheless, transforming the information right into ecological variables, JUST the password (process.env.MAIL_PASSWORD) functions as an ecological.
If I attempt to change the username, customer key, customer ID or any type of various other info with an ecological variable I obtain a mistake stating that information can not be located.
I have actually included the code (with every one of the info modified for personal privacy) to a codesandbox which you can discover right here.
Note: I have actually attempted including NEXT_PUBLIC_ to the ecological variables, yet still obtain the exact same mistake. I have actually additionally attempted including them to the next.config.js data as well as obtain the exact same concern, the password functions great yet absolutely nothing else does.
Please assist, this set is driving me crazy!