1.1.1 • Published 7 years ago

offline-mailer v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

Offline-mailer

Check a website's status and send an e-mail when it is offline. Send another e-mail when it is back online with a screenshot of the website (to be sure that the online status gives you the desired result).

Installation

We suggest you to use NPM directly to install the package:

npm install offline-mailer

All the modules will be installed under "node_modules" on your current project map.

Start

Create a new file (example.js) and require the package and cron:

const {settings, mailConfig, start} = require('offline-mailer');
var CronJob = require('cron').CronJob;

Configure the address (URL/IP to check) and the receiver (email receiver):

settings({
address: "<Your website>",
receiver: "<Your email>"
});

Configure node-mailer:

mailConfig({
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth: {
    user: '<Gmail email>',
    pass: '<Gmail password>'
}
});

Run the cronjob and start the offline-mailer each time:

var job = new CronJob('* * * * * *', () => {
start();
}, null, true, 'Europe/Amsterdam');
1.1.1

7 years ago

1.1.0

7 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago