javascript - verify if email is delivered successfully nodemailer (sails.js) -
i'm using nodemailer module send email in sails.js project. i'm wondering if there way know if email delivered or email somehow failed due attachment or may wrong email address.
how can make sure email address valid or not ? or email being delivered relevant email address or not ?
i've read nodemailer documentation , have done r&d on far i'm not able find productive.
please let me know if there way confirm email or not.
thanks.
it's simple. sendmail has callback argument. checking if error exists in callback.
transport.sendmail({}, (error, result) => { if (error) return console.error(error); return console.log(result); }); or can use sails-service-mailer package sending mails - https://github.com/ghaiklor/sails-service-mailer. can write code this
smtpmailer .send({}) .then(console.log.bind(console)) .catch(console.error.bind(console)); if want check pool or there no possibility, suppose. if send mail non-existing email address sends usual, not received recipient. anyway, can check if mail added pool only.
Comments
Post a Comment