-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should this work with nodemailer's embedded images using the 'cid' parameter? #31
Comments
Hm, I agree that this shouldn't throw an error. It's not this package that prints it, it's way up the stack in https://www.npmjs.com/package/web-resource-inliner. For now you will have to put up with it, but I will see if there is a way to avoid this with patches upstream. |
Hi! Thank you! Br, On 18 February 2016 at 15:15, Andi Sidwell notifications@github.com wrote:
|
I wonder if
|
web-resource-inliner won't touch URLs it doesn't understand, just throw a warning. So if you use a data: url it won't remove it but it might say it doesn't understand it. However, there's not much point in putting the image in a data: url yourself. You might as well keep it separate on the filesystem for easier modification and let web-resource-inliner turn it into a data: URL for you. |
This has been fixed upstream (see jrit/web-resource-inliner#21) so I will update dependencies soon and then this warning will be fixed. |
emailHelper.templates.render('email_test.html', context, function (err, html, text) {
emailHelper.transporter.sendMail({
from: 'xy@gmail.com',
to: 'yy@gmail.com',
subject: 'Testmail',
html: html,
//text: text
attachments: [{
filename: 'logo.jpg',
path: '../../public/img',
cid: 'logouniquecid' //same cid value as in the html img src
}]
});
});
Settings:
var templates = new EmailTemplates({
root: global.appRoot + '/server/templates',
text: false, // Disable text alternatives
swig: {
cache: false // Don't cache swig templates
}
});
In email_test.html
<img class="img-responsive" src="cid:logouniquecid"/>
The cid value is the same as should be... however, I always get the rendered mail with inline CSS and the image, but I always get the following error:
Not found, skipping: cid:logouniquecid
The text was updated successfully, but these errors were encountered: