is-autoreply
v1.1.3
Published
Detect if email is an autoreply according to the email headers.
Downloads
151
Readme
is-autoreply
Returns true
if email is an autoreply according to the email headers.
Please open an issue if an email isn't properly detected as autoreply :)
Installation
npm install --save is-autoreply
Programmatic usage
Headers can be String, Buffer or Object (key/value). In case of String or Buffer, the headers are automatically parsed.
const isAutoreply = require('is-autoreply');
const emailHeaders = { 'X-Auto-Response-Suppress': 'OOF' };
if (isAutoreply(emailHeaders)) {
console.log('The email is an autoreply');
}