mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
Merge pull request #2235 from vale981/wrapperless_emails
Add wrapperless Emails.
This commit is contained in:
commit
e8bb212530
1 changed files with 8 additions and 1 deletions
|
@ -69,7 +69,14 @@ VulcanEmail.buildTemplate = (htmlContent, data = {}, locale) => {
|
||||||
__: Strings[locale],
|
__: Strings[locale],
|
||||||
};
|
};
|
||||||
|
|
||||||
const emailHTML = VulcanEmail.getTemplate('wrapper')(emailProperties);
|
let emailHTML;
|
||||||
|
|
||||||
|
try {
|
||||||
|
emailHTML = VulcanEmail.getTemplate('wrapper')(emailProperties);
|
||||||
|
} catch(e) {
|
||||||
|
emailHTML = htmlContent;
|
||||||
|
}
|
||||||
|
|
||||||
const inlinedHTML = Juice(emailHTML, { preserveMediaQueries: true });
|
const inlinedHTML = Juice(emailHTML, { preserveMediaQueries: true });
|
||||||
const doctype =
|
const doctype =
|
||||||
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
|
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
|
||||||
|
|
Loading…
Add table
Reference in a new issue