DEV Community

Discussion on: Sending Email with Netlify Functions

 
thetechnaddict profile image
thetechnaddict

I went back to testing with the sandbox and the email sent - but ended up in spam. -which could be reasonable since it claims to be from one domain and has been sent by another. - I guess I just have to test it on the server

Thread Thread
 
thetechnaddict profile image
thetechnaddict

If I hardcode sandbox secrets into the file it sends happily from the localhost. If I then switch to using dotenv it fails suggesting that require('dotenv').config() isn't loading up process.env

Thread Thread
 
thetechnaddict profile image
thetechnaddict

Reinstalling dotenv has sorted the problem