Bugfixes
This commit is contained in:
parent
1448d9e914
commit
bc818aaee2
11 changed files with 35 additions and 27 deletions
|
@ -226,7 +226,7 @@ async function _createTransport(sendConfiguration) {
|
|||
|
||||
transport.mailer = {
|
||||
throttleWait: bluebird.promisify(throttleWait),
|
||||
sendTransationalMail: async (mail, template) => await _sendTransactionalMail(transport, mail, template),
|
||||
sendTransactionalMail: async (mail, template) => await _sendTransactionalMail(transport, mail, template),
|
||||
sendMassMail: async (mail, template) => await _sendMail(transport, mail)
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const log = require('./log');
|
||||
const log = require('npmlog');
|
||||
const fields = require('../models/fields');
|
||||
const settings = require('../models/settings');
|
||||
const {getTrustedUrl} = require('./urls');
|
||||
|
@ -128,7 +128,7 @@ async function _sendMail(list, email, template, subject, relativeUrls, subscript
|
|||
type: 'mjml'
|
||||
};
|
||||
|
||||
if (list.default_form !== null) {
|
||||
if (list.default_form) {
|
||||
const form = await forms.getById(contextHelpers.getAdminContext(), list.default_form);
|
||||
|
||||
text.template = form['mail_' + template + '_text'] || text.template;
|
||||
|
|
|
@ -40,7 +40,7 @@ async function getTemplate(template) {
|
|||
}
|
||||
|
||||
if (template.type === 'mjml') {
|
||||
const compiled = mjml.mjml2html(source);
|
||||
const compiled = mjml(source);
|
||||
|
||||
if (compiled.errors.length) {
|
||||
throw new Error(compiled.errors[0].message || compiled.errors[0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue