What I know
I want to implement the email opened/not tracking in one of my websites. after searching i found that email-opened/not tracking is done by
EDIT: This answer is useless because the URL is resolved by nodemailer before sending the email. Still going to leave it here, as it may point someone to the right direction.
As of nodemailer version 1.3.4, you can use URLs as attachments, eg:
attachments: [
{
filename: 'receipt.png',
path: 'http://example.com/email-receipt?id=1\&email=ex@ample.com',
cid: 'receipt@example.com'
}
//...
Then, you just embed it in your HTML:
That will do the trick. Might be useful to mention that, in my case, the URL returns a file download.
I still can't understand if the URL is resolved by nodemailer, while packing, or by the email client. But something is doing it because I've tested Thunderbird and Geary (desktop), Gmail and Rainloop (browser) and it's working.
Can't guarantee that will work in every case, though.