I have a mail body with an inline image set as following:
<img src="cid:<<content-id>>">
I am using nodemailer
to send mails. I also have a relative URL to the image. But the image is not being displayed in Outlook. Seems like cid
is not working with recent versions of Outlook.
Other options?
Is it possible to get base64
of the image in nodejs. I have seen example with canvas
and xmlhttprequest
but that can't be done in node without using external modules which I don't want to.
Any solutions please?
Using an example, if your
html
property is:then
attachments
property has to be as follows:For additional embedded images, just add them to the
attachments
array.The above will generate a mail as follows: