Meteor.startup(function () { Router.route('/email/campaign', { name: 'campaign', where: 'server', action: function() { var campaign = buildCampaign(getCampaignPosts(Settings.get('postsPerNewsletter', 5))); var campaignSubject = '
Subject: '+campaign.subject+' (note: contents might change)
'; var campaignSchedule = '
Scheduled for: '+ Meteor.call('getNextJob') +'
'; this.response.write(campaignSubject+campaignSchedule+campaign.html); this.response.end(); } }); Router.route('/email/digest-confirmation', { name: 'digestConfirmation', where: 'server', action: function() { var confirmationHtml = Telescope.email.getTemplate('emailDigestConfirmation')({ time: 'January 1st, 1901', newsletterLink: 'http://example.com', subject: 'Lorem ipsum dolor sit amet' }); this.response.write(Telescope.email.buildTemplate(confirmationHtml)); this.response.end(); } }); });