-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
48 lines (41 loc) · 1.79 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module.exports = {
pingOnStart: true,
log: false,
strikes: 2,
stopOnLastStricke: true,
mail: {
account: {
email: 'shuki.duki77@gmail.com',
password: 'feedback123'
},
message: {
//from: account.email, //Defaults to the account email. Uncomment to specify a different address
//replyTo: account.email, //Defaults to the account email. Uncomment to specify a different address
to: 'Alon Kaduri <alon.kaduri@conduit.com>', //'you@example.com, another@example.com', //Comma separated addresses. Name can be formatted as well: 'Receiver Name <receiver@gmail.com>'
cc: '', //Optional
bcc: '', //Optional
subject: function(alias, url) {
//Edit the mail subject as you like
return (alias + ' is down !');
},
content: function(alias, url, statusCode, statusCodeMsg) {
//Edit the mail body as you like
var time = module.exports.mail.utils.getFormatedDate(Date.now());
var htmlMsg = '<p>Time: ' + time + '</p>';
htmlMsg +='<p>Website: ' + ((alias !== url) ? (alias + ' (' + url + ')') : url) + '</p>';
htmlMsg += '<p>Message: ' + statusCodeMsg + ' (' + statusCode + ')</p>';
return htmlMsg;
}
},
utils: {
getFormatedDate: function (time) {
//Edit the time format as you like
var currentDate = new Date(time);
currentDate = currentDate.toISOString();
currentDate = currentDate.replace(/T/, ' ');
currentDate = currentDate.replace(/\..+/, '');
return currentDate;
}
}
}
};