JacobYim / CSE442-BuyNSell

This is the repository for the CSE442 BuyNSell Web app project.
2 stars 5 forks source link

forget email function undefined email error #166

Closed JacobYim closed 5 years ago

JacobYim commented 5 years ago

When try to use forget email function, there is error that showing error message

{ Error: No recipients defined
    at SMTPConnection._formatError (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-connection/index.js:781:19)
    at SMTPConnection._setEnvelope (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-connection/index.js:993:34)
    at SMTPConnection.send (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-connection/index.js:619:14)
    at sendMessage (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-transport/index.js:227:28)
    at connection.login.err (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-transport/index.js:285:25)
    at SMTPConnection._actionAUTHComplete (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-connection/index.js:1530:9)
    at SMTPConnection._responseActions.push.str (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-connection/index.js:554:26)
    at SMTPConnection._processResponse (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-connection/index.js:940:20)
    at SMTPConnection._onData (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-connection/index.js:746:14)
    at TLSSocket.SMTPConnection._onSocketData (/Users/junghwanyim/CSE442/1/CSE442-BuyNSell/node_modules/nodemailer/lib/smtp-connection/index.js:189:46) code: 'EENVELOPE', command: 'API' }
JacobYim commented 5 years ago

I fixed this with changing the input tag name in forget_password.ejs to email matching to the part in server.js in forget-email-take-email-part-error branch

var email = String(req.body['email']);