Closed zdila closed 7 years ago
I admit that it can be a bug in juice
or web-resource-inliner
it uses. Hopefully this will prevent it for us:
juiceResources: {
webResources: {
images: false,
},
},
This is due to #239 and https://github.com/niftylettuce/juice-resources-promise using juice
which is not using the right version. I'm waiting on a patch version bump of juice
in https://github.com/Automattic/juice/issues/279 so then I can use juice
package directly vs. using my fork on GitHub.
@zdila can you please try npm install --save email-templates@3.0.6
?
@zdila did you try latest version of email-templates
? should be fixed. npm install email-templates@latest
.
Now it doesn't error, but it removes src
from img
completely.
const email = new Email({
message: {
from: {
name: No Reply,
address: 'noreply@example.com',
},
},
transport: nodemailer.createTransport(ses({ ...config.get('email.credentials') })),
views: {
options: {
extension: 'ejs',
},
},
htmlToText: false,
juice: true,
juiceResources: {
preserveImportant: true,
// webResources: { // uncomment to keep `src`
// images: false,
// },
},
});
What version of juice and email-templates?
On Oct 23, 2017 3:57 AM, "Martin Ždila" notifications@github.com wrote:
Now it doesn't error, but it removes src from img completely.
const email = new Email({ message: { from: { name: No Reply, address: 'noreply@example.com', }, }, transport: nodemailer.createTransport(ses({ ...config.get('email.credentials') })), views: { options: { extension: 'ejs', }, }, htmlToText: false, juice: true, juiceResources: { preserveImportant: true, // webResources: { // uncomment to keep
src
// images: false, // }, }, });— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/niftylettuce/email-templates/issues/244#issuecomment-338577201, or mute the thread https://github.com/notifications/unsubscribe-auth/AAf7hbVxX2VCSpcON7VND7R-c93X00m6ks5svEbTgaJpZM4Pr4cg .
"juice": "4.2.2"
"email-templates": "3.1.5"
Can you share any more info for me to reproduce the issue, such as a template and script to run? It'd be helpful if you even wrote a test that fails.
On Oct 23, 2017 4:00 AM, "Martin Ždila" notifications@github.com wrote:
"juice": "4.2.2" "email-templates": "3.1.5"
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/niftylettuce/email-templates/issues/244#issuecomment-338578136, or mute the thread https://github.com/notifications/unsubscribe-auth/AAf7hb1uJ534MGa6BwBon4VGxQFYa8u7ks5svEe0gaJpZM4Pr4cg .
In our mail templates we only use images stored on remote server (S3) and referenced with absolute URL. We often see following error in the logs:
But sometimes the same template just works OK.
Versions: