Skip to content

Commit b4dfdb4

Browse files
authored
Merge pull request #2386 from processing/bug/mjml
Fix mjml syntax for v4.
2 parents 3493b3b + e4d3a2b commit b4dfdb4

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

server/utils/renderMjml.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { mjml2html } from 'mjml';
1+
import mjml2html from 'mjml';
22

33
export default (template) => {
44
try {
55
const output = mjml2html(template);
66
return output.html;
77
} catch (e) {
8+
console.error(e);
89
// fall through to null
910
}
1011

server/views/consolidationMailLayout.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ export default ({
2121
</mj-raw>
2222
</mj-head>
2323
<mj-body>
24-
<mj-container>
2524
<mj-section>
2625
<mj-column>
27-
<mj-image width="192" src="${domain}/images/p5js-square-logo.png" alt="p5.js" />
26+
<mj-image width="192px" src="${domain}/images/p5js-square-logo.png" alt="p5.js" />
2827
<mj-divider border-color="#ed225d"></mj-divider>
2928
</mj-column>
3029
</mj-section>
@@ -71,7 +70,6 @@ export default ({
7170
</mj-text>
7271
</mj-column>
7372
</mj-section>
74-
</mj-container>
7573
</mj-body>
7674
</mjml>
7775
`;

server/views/mailLayout.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ export default ({
1818
</mj-raw>
1919
</mj-head>
2020
<mj-body>
21-
<mj-container>
2221
<mj-section>
2322
<mj-column>
24-
<mj-image width="192" src="${domain}/images/p5js-square-logo.png" alt="p5.js" />
23+
<mj-image width="192px" src="${domain}/images/p5js-square-logo.png" alt="p5.js" />
2524
<mj-divider border-color="#ed225d"></mj-divider>
2625
</mj-column>
2726
</mj-section>
@@ -59,7 +58,6 @@ export default ({
5958
</mj-text>
6059
</mj-column>
6160
</mj-section>
62-
</mj-container>
6361
</mj-body>
6462
</mjml>
6563
`;

0 commit comments

Comments
 (0)