mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
refs https://github.com/TryGhost/Toolbox/issues/292 - Following the concept of having as little code in Ghost core as possible :) The email content generation is also needed to be reused in the version mismatch handling package.
15 lines
615 B
JavaScript
15 lines
615 B
JavaScript
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)
|
|
};
|