Skip to content

BOOKATIGER/is-autoreply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-autoreply

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');
}

License

MIT