1.1.1 • Published 10 years ago

offline-mailer v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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

10 years ago

1.1.0

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago