node.js - how to keep track of bounced emails or undelivered emails in sails.js -
i using nodemailer send mails.
my requirement keep track of bounced emails or undelivered emails.
how ? please help
you cannot in current configuration. mail functions not return immediately, if mail delivered or recipient unavailable. mail accepted smtp server , script goes on. smtp server (in background , asynchronously) tries send mail (likely multiple times) , if fails, sends mail back.
this mail 1 interested in.
the mda/mta use (for example sendmail) should configured pass on incoming mails script set up. way script gets automatically started, if there come in new mails interested in. how configure mda/mta already answered.
if works, need "parse" mail. think mail provided script standard input stream. can access 1 process.stdin. must check mail errors, bounces, or whatever interested in , can possibly save status of recipient in database.
Comments
Post a Comment