mirror of
https://gitlab.silvrtree.co.uk/martind2000/old-silvrgit.git
synced 2025-01-10 20:55:07 +00:00
updates
This commit is contained in:
parent
af48d9d469
commit
1c84148af2
@ -2,7 +2,7 @@
|
||||
* Created by marti on 30/01/2016.
|
||||
*/
|
||||
var http = require('http'), request = require('request'), cheerio = require('cheerio'), Forecast = require('forecast.io'), util = require('util'), UltraSES = require('ultrases'), cron = require('node-cron');
|
||||
var jade = require('jade'), _ = require('lodash');
|
||||
var jade = require('jade'), _ = require('lodash'), dateFormat = require('dateformat');
|
||||
var jsonfile = require('jsonfile');
|
||||
|
||||
var todayCache = {
|
||||
@ -203,12 +203,15 @@ module.exports = {
|
||||
;
|
||||
|
||||
function sendEmail() {
|
||||
|
||||
var now = new Date();
|
||||
|
||||
var email = {
|
||||
to: 'martind2000@gmail.com',
|
||||
subject: 'Today'
|
||||
subject: 'Today - ' + dateFormat(now, "dddd, mmmm dS, yyyy")
|
||||
};
|
||||
|
||||
var template = {file: 'jade/today.jade', locals: todayCache};
|
||||
var template = {file: 'lib/jade/today.jade', locals: todayCache};
|
||||
mailer.sendTemplate(email, template, function (err) {
|
||||
if (err) throw err;
|
||||
console.log('compiled template email sent');
|
||||
|
@ -3,6 +3,7 @@
|
||||
"version": "0.1.1",
|
||||
"devDependencies": {
|
||||
"cheerio": "^0.19.0",
|
||||
"dateformat": "^1.0.12",
|
||||
"ejs": "^2.3.4",
|
||||
"forecast.io": "0.0.9",
|
||||
"htmlparser": "^1.7.7",
|
||||
|
Loading…
Reference in New Issue
Block a user