rtteo

0.1.0 • Public • Published

rtteo

A very minimal and lightweight mail listener written in Node.

Usage

const { Rtteo } = require('rtteo')

// An email with a subject like 'Alarm from: ets XYZ Corp' will result in:
// Type: alarm, Company: XYZ Corp.
const rtteo = new Rtteo({
  // You can define whatever mail provider you like editing the config/default.json file
  provider: 'gmail',
  email: 'john.doe@gmail.com',
  password: 'password',
  subjects: {
    alarm: new RegExp('Alarm from: ets (.*)'),
    info: new RegExp('Info from: ets (.*)'),
    warning: new RegExp('Warning from: ets (.*)')
  }
}, (email, type, matches) => {
  const dest = matches[1]
  console.log(`Type: ${type}, To: ${dest}`)
})

rtteo.connect()

License

rtteo is released under GNU/GPL v3.

Readme

Keywords

none

Package Sidebar

Install

npm i rtteo

Weekly Downloads

1

Version

0.1.0

License

GPL-3.0

Unpacked Size

41.1 kB

Total Files

9

Last publish

Collaborators

  • domcorvasce