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

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -