I'm using the node-Sendmail npm package in my express JS app, which is like the MVC structure. I have some weird errors, like
node_modules\sendmail\sendmail.js:291
if (mail.to) {
^
TypeError: Cannot read properties of undefined (reading 'to')
Please see the image above. I tried to send the email when the login route was requested, but it sent the email after the server crashed, and this error showed. I checked their official GitHub and asked a question, but no one replied. Have you ever used a node-Sendmail package?
I checked to see if there were any errors in the node module package and code, and here is a screenshot.
I called the Sendmail with import module :
CodePudding user response:
You're calling sendmail
with no configuration on line 47, that is throwing your error