answering my own question after digging around and going to leave this up in case anyone finds this helpful. Basically followed the answer in this post TMTP is not working properly when deployed to netlify and the key was to await the sendmail function and the transporter.sendmail({…}) function. Also stripped out a lot of what’s above (remove the try catch block) and remove the callback (err, info) => {} function.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Nodemailer email not sending in production netlify function (fine locally) | 1 | 1392 | February 26, 2023 | |
| TMTP is not working properly when deployed to netlify | 4 | 804 | February 5, 2023 | |
| Nodemailer does not seem to work with netlify, it works on localhost | 6 | 2040 | August 5, 2023 | |
| Netlify function for sending mail with nodemailer doesn't work in production | 9 | 4877 | June 15, 2022 | |
| Problem in production with nodemailer | 4 | 2191 | June 2, 2022 |