0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00
ghost/core/server/services/mail/index.js

16 lines
615 B
JavaScript
Raw Normal View History

const path = require('path');
const urlUtils = require('../../../shared/url-utils');
const settingsCache = require('../../../shared/settings-cache');
const EmailContentGenerator = require('@tryghost/email-content-generator');
const emailContentGenerator = new EmailContentGenerator({
getSiteUrl: () => urlUtils.urlFor('home', true),
getSiteTitle: () => settingsCache.get('title'),
templatesDir: path.resolve(__dirname, '..', 'mail', 'templates')
});
exports.GhostMailer = require('./GhostMailer');
exports.utils = {
generateContent: emailContentGenerator.getContent.bind(emailContentGenerator)
};