{"_id":"nodemailer-plugin-inline-base64","_rev":"225-a2a0229100f45bcebb6eb6ffa4267896","name":"nodemailer-plugin-inline-base64","dist-tags":{"latest":"2.1.1"},"versions":{"0.0.1":{"name":"nodemailer-plugin-inline-base64","version":"0.0.1","keywords":["nodemailer","plugin","base64","attachment"],"author":{"url":"https://mixmax.com/","name":"Brad Vogel","email":"brad@mixmax.com"},"license":"MIT","_id":"nodemailer-plugin-inline-base64@0.0.1","maintainers":[{"name":"bradvogel","email":"bradavogel@gmail.com"}],"homepage":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64","bugs":{"url":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64/issues"},"dist":{"shasum":"5536e020b1cb9abe83531475b9c7fd6776536690","tarball":"https://registry.npmjs.org/nodemailer-plugin-inline-base64/-/nodemailer-plugin-inline-base64-0.0.1.tgz","integrity":"sha512-3iRn6CsYHIPl1Hrj5lPnVkmliaKRVy0AMCDK7xMJJxMFPBwFCR3Bmwjk44CmQlv+vOO4LuX3repFMvceVW/U4w==","signatures":[{"sig":"MEUCIH5LpanOmeMNA3V1yXbvfkV0nsUk1vqM4XBdcWGev3msAiEA+Gu+V6yrUY1CLJhon979XR4dqb+Yxm8EUZisENehnm8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/plugin.js","_from":".","_shasum":"5536e020b1cb9abe83531475b9c7fd6776536690","scripts":{"test":"jasmine-node test/"},"_npmUser":{"name":"bradvogel","email":"bradavogel@gmail.com"},"repository":{"url":"git://github.com/mixmaxhq/nodemailer-plugin-inline-base64.git","type":"git"},"_npmVersion":"1.4.9","description":"Nodemailer plugin that will inline base64 images","directories":{"test":"test"},"dependencies":{},"devDependencies":{}},"1.0.1":{"name":"nodemailer-plugin-inline-base64","version":"1.0.1","keywords":["nodemailer","plugin","base64","attachment"],"author":{"url":"https://mixmax.com/","name":"Brad Vogel","email":"brad@mixmax.com"},"license":"MIT","_id":"nodemailer-plugin-inline-base64@1.0.1","maintainers":[{"name":"bradvogel","email":"bradavogel@gmail.com"}],"homepage":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64","bugs":{"url":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64/issues"},"dist":{"shasum":"7c59b635abaa7a7bc360149fedc95d5b8a45bbad","tarball":"https://registry.npmjs.org/nodemailer-plugin-inline-base64/-/nodemailer-plugin-inline-base64-1.0.1.tgz","integrity":"sha512-ASVGi8EIwEq+FePAvvVkF/VHYTTbdLL6KTdV8OolJ7wxdOty4WwiIW8C2qulv07OME/54e25ES5VBO8bSHn3HQ==","signatures":[{"sig":"MEUCIEZHfe0gElKDpEjS/lN42OtwUAVJyyRywp21+dmq+wgvAiEA2ejkDP8aRDgiwTrVB3x44G7gSwbQE5L6FAsv/c5hZvk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/plugin.js","_from":".","_shasum":"7c59b635abaa7a7bc360149fedc95d5b8a45bbad","scripts":{"test":"jasmine-node test/"},"_npmUser":{"name":"bradvogel","email":"bradavogel@gmail.com"},"repository":{"url":"git://github.com/mixmaxhq/nodemailer-plugin-inline-base64.git","type":"git"},"_npmVersion":"1.4.9","description":"Nodemailer plugin that will inline base64 images","directories":{"test":"test"},"dependencies":{},"devDependencies":{}},"2.0.0":{"name":"nodemailer-plugin-inline-base64","version":"2.0.0","keywords":["nodemailer","plugin","base64","attachment"],"author":{"url":"https://mixmax.com/","name":"Brad Vogel","email":"brad@mixmax.com"},"license":"MIT","_id":"nodemailer-plugin-inline-base64@2.0.0","maintainers":[{"name":"bradvogel","email":"bradavogel@gmail.com"},{"name":"chanpory","email":"junk@rith.com"},{"name":"chuy-mixmax","email":"chuy@mixmax.com"},{"name":"mixmax-aws","email":"admin+mixmax-aws-npm@mixmax.com"},{"name":"mixmax-codeship","email":"admin+mixmax-codeship-npm@mixmax.com"},{"name":"mixmax-galaxy","email":"admin+mixmax-galaxy-npm@mixmax.com"},{"name":"pricj004","email":"pricj004@gmail.com"},{"name":"scb","email":"me@spencer.sx"},{"name":"seangarita","email":"alosoleil@fastmail.com"},{"name":"ttacon","email":"ttacon@gmail.com"},{"name":"vinnyoodles","email":"vinnyoodles@gmail.com"},{"name":"wearhere","email":"jeffreywear@gmail.com"},{"name":"whatgaul","email":"jon@pomsky.io"}],"homepage":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64","bugs":{"url":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64/issues"},"dist":{"shasum":"efe82aad77d9679ebd064c2b3ec8e47a870dd11b","tarball":"https://registry.npmjs.org/nodemailer-plugin-inline-base64/-/nodemailer-plugin-inline-base64-2.0.0.tgz","integrity":"sha512-LkevBkRnqBtlbrnT3mOinJVcrNnL/tLpj/hYmjvSqiNEhBw6G4AL5U3kmjbzbBoLqAXyDOZTbruOolla63yfxw==","signatures":[{"sig":"MEYCIQCzjXxuC31woSKQ+JoorNMLk3f6k8EHmCmGUeuesXvRAwIhAMOoVYspnHuel0c0mT5xdFvoQLmYIvgPVubpwn4QrN8L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/plugin.js","_from":".","_shasum":"efe82aad77d9679ebd064c2b3ec8e47a870dd11b","gitHead":"365c28c40b1df7e8b8ceb1c68628555dc837207f","scripts":{"test":"jasmine-node test/"},"_npmUser":{"name":"bradvogel","email":"bradavogel@gmail.com"},"repository":{"url":"git://github.com/mixmaxhq/nodemailer-plugin-inline-base64.git","type":"git"},"_npmVersion":"2.15.5","description":"Nodemailer plugin that will inline base64 images","directories":{"test":"test"},"_nodeVersion":"6.9.1","dependencies":{},"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/nodemailer-plugin-inline-base64-2.0.0.tgz_1480977056938_0.8570555853657424","host":"packages-12-west.internal.npmjs.com"}},"2.1.0":{"name":"nodemailer-plugin-inline-base64","version":"2.1.0","keywords":["nodemailer","plugin","base64","attachment"],"author":{"url":"https://mixmax.com/","name":"Brad Vogel","email":"brad@mixmax.com"},"license":"MIT","_id":"nodemailer-plugin-inline-base64@2.1.0","maintainers":[{"name":"bradvogel","email":"bradavogel@gmail.com"},{"name":"wbw20","email":"wbw20@case.edu"},{"name":"mericsson","email":"mericsson@gmail.com"},{"name":"simonxca","email":"simoncxiong@gmail.com"},{"name":"logandavis","email":"logankeahidavis@gmail.com"},{"name":"ghmeier","email":"meier.garret@gmail.com"},{"name":"skeggse","email":"skeggse@gmail.com"},{"name":"olofster","email":"olofmathe@hotmail.com"},{"name":"jenskene","email":"jen+npm@mixmax.com"},{"name":"chanpory","email":"junk@rith.com"},{"name":"pricj004","email":"pricj004@gmail.com"},{"name":"mixmax-codeship","email":"admin+mixmax-codeship-npm@mixmax.com"},{"name":"chuy-mixmax","email":"chuy@mixmax.com"},{"name":"scb","email":"me@spencer.sx"},{"name":"ttacon","email":"ttacon@gmail.com"},{"name":"wearhere","email":"jeffreywear@gmail.com"}],"homepage":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64","bugs":{"url":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64/issues"},"dist":{"shasum":"017ce72787787dc612cf7a4bf77e5a3e1001a72e","tarball":"https://registry.npmjs.org/nodemailer-plugin-inline-base64/-/nodemailer-plugin-inline-base64-2.1.0.tgz","integrity":"sha512-8iehklE0UFvYcZOITNMwyFMpclaJPSqnzoSRYGvbBR1jggarc1Km5PgMli0L8VV8jFiwhBZ0FMcksL+DUfhHvQ==","signatures":[{"sig":"MEQCIGS3H55cvlBPQjnewM2thEDBOP+bgi/3e91INVO6mmp8AiB8vtoj2NF3kOuabQxLqPmxXO5CI0tRwQv0KPbTW+/MQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/plugin.js","gitHead":"7eb2627ac0fc6e7e710de94bb91bfb9a8011d852","scripts":{"test":"jasmine-node test/"},"_npmUser":{"name":"bradvogel","email":"bradavogel@gmail.com"},"repository":{"url":"git://github.com/mixmaxhq/nodemailer-plugin-inline-base64.git","type":"git"},"_npmVersion":"5.4.1","description":"Nodemailer plugin that will inline base64 images","directories":{"test":"test"},"_nodeVersion":"6.9.1","dependencies":{},"devDependencies":{"jasmine-node":"^1.14.5"},"_npmOperationalInternal":{"tmp":"tmp/nodemailer-plugin-inline-base64-2.1.0.tgz_1509044142968_0.9482857212424278","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"nodemailer-plugin-inline-base64","version":"2.1.1","keywords":["nodemailer","plugin","base64","attachment"],"author":{"url":"https://mixmax.com/","name":"Brad Vogel","email":"brad@mixmax.com"},"license":"MIT","_id":"nodemailer-plugin-inline-base64@2.1.1","maintainers":[{"name":"bradvogel","email":"bradavogel@gmail.com"},{"name":"chanpory","email":"junk@rith.com"},{"name":"chuy-mixmax","email":"chuy@mixmax.com"},{"name":"ghmeier","email":"meier.garret@gmail.com"},{"name":"jenskene","email":"jen+npm@mixmax.com"},{"name":"logandavis","email":"logankeahidavis@gmail.com"},{"name":"mericsson","email":"mericsson@gmail.com"},{"name":"mixmax-codeship","email":"admin+mixmax-codeship-npm@mixmax.com"},{"name":"olofster","email":"olofmathe@hotmail.com"},{"name":"pricj004","email":"pricj004@gmail.com"},{"name":"scb","email":"me@spencer.sx"},{"name":"simonxca","email":"simoncxiong@gmail.com"},{"name":"skeggse","email":"skeggse@gmail.com"},{"name":"ttacon","email":"ttacon@gmail.com"},{"name":"wearhere","email":"jeffreywear@gmail.com"}],"homepage":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64","bugs":{"url":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64/issues"},"dist":{"shasum":"249cbc87ccf5ed26efb9a4023e4b6dc881e8d9b2","tarball":"https://registry.npmjs.org/nodemailer-plugin-inline-base64/-/nodemailer-plugin-inline-base64-2.1.1.tgz","fileCount":8,"integrity":"sha512-/cTnVq9vxZBDh5FjCOkPG5ioTs4o7flRuaqfDGLUfa5yeSMR21OW8hgWJIGuCHgcXmN5QHbR8IeujJeeOzi7uQ==","signatures":[{"sig":"MEYCIQDg+7VliSImS40+iJ9L9c/iQdIqirY92HvfFZ6YQKkkPQIhANvRBQ8rmcIwuNXivfn3xZin5GZSMHq9BcmbPL+1Zniv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh21N8CRA9TVsSAnZWagAAfw8P/21I1vLc7Il6kYagTF8x\nWbO3fJ594KO+kp2CkqHH0wYuCwN+EyAp3Num6W8EbqQlrkfMo9B9yEqiraUy\nxW+DGnL9spuKavFFPN6zZwx2p1qnH2NwrboYhuc5A0Hbu4HgUWhw3Pwx6pHV\nVWz/eDjnFtcVXJX7r11SIPonTRJt1aptP/a80XUnC9SGKS339bB5lYX0h6SI\n5UkHq2PspPst2Ll3JKwZiLHfnEY17mFvRFnGUE5znYp4GYfgDurr+ikpLJOQ\nt0FwbmNJ28s2gO2h6bEClAWU5q9qJP0XWNsQV2T/nF4/neh7pdopdacfXBe5\napXWZBVskcXZ5T1b6zryr4TU3IO/qIXHNDOlB1hD2jpaB6wRyrNtVz1FbC8W\nw0nzIPECBsiWzX9eO5nGwFSGksWEVJ/mjn/nsbt8QcQ5blBk6sNUF6TynpLK\ncefiGWfNeqVv97hRQlbpy8yQCtboHDM0Hb98xoMX4EMoMsvhe4g0dnQOwlCx\nFRYfqZI2IXndzFP4OczUGvUviXDykpI5Ap4oKeu8tCvzHb6ILRoF6ZKPE45g\nyL0enqRh0L+x1YkElojU9WtqepSp7DbHfoiQ87sbIzti/FaRRIDKH17g/Dgs\nxOMEddAbcFmxhUDSmrVZDDzP9b31C4xsrnadLbc52sAe10vB3NPiJqna6ZFa\nHq9a\r\n=j4ue\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/plugin.js","gitHead":"3874ab65819c8203a071d7dda12d6923c6b5af27","scripts":{"test":"jasmine-node test/"},"_npmUser":{"name":"bradvogel","email":"bradavogel@gmail.com"},"repository":{"url":"git://github.com/mixmaxhq/nodemailer-plugin-inline-base64.git","type":"git"},"_npmVersion":"5.6.0","description":"Nodemailer plugin that will inline base64 images","directories":{"test":"test"},"_nodeVersion":"8.9.4","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jasmine-node":"^1.14.5"},"_npmOperationalInternal":{"tmp":"tmp/nodemailer-plugin-inline-base64_2.1.1_1521569690419_0.960624008237065","host":"s3://npm-registry-packages"}}},"time":{"created":"2015-04-16T00:51:07.398Z","modified":"2026-08-06T09:08:30.394Z","0.0.1":"2015-04-16T00:51:07.398Z","1.0.1":"2015-05-28T19:20:46.664Z","2.0.0":"2016-12-05T22:30:57.166Z","2.1.0":"2017-10-26T18:55:43.033Z","2.1.1":"2018-03-20T18:14:50.473Z"},"bugs":{"url":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64/issues"},"author":{"url":"https://mixmax.com/","name":"Brad Vogel","email":"brad@mixmax.com"},"license":"MIT","homepage":"https://github.com/mixmaxhq/nodemailer-plugin-inline-base64","keywords":["nodemailer","plugin","base64","attachment"],"repository":{"url":"git://github.com/mixmaxhq/nodemailer-plugin-inline-base64.git","type":"git"},"description":"Nodemailer plugin that will inline base64 images","maintainers":[{"email":"mikusdominikcz@gmail.com","name":"mikusd"},{"email":"admin+mixmax-codeship-npm@mixmax.com","name":"mixmax-codeship"},{"email":"jesse@mixmax.com","name":"jessem3"},{"email":"syed.ahmed.anas@gmail.com","name":"ahmed-anas"},{"email":"guilhermem.j@hotmail.com","name":"guilhermemj"},{"email":"jordi.salvat.i.alabart@gmail.com","name":"jsalvata"},{"email":"raphael.b.souza@hotmail.com","name":"raphaelbs"},{"email":"it-ops@mixmax.com","name":"mixmax_it"},{"email":"akashbhalla@gmail.com","name":"akashbhalla"},{"email":"jordi.nistal@gmail.com","name":"jordins"},{"email":"amina@mixmax.com","name":"aminao"},{"email":"misterpy@gmail.com","name":"misterpy"},{"email":"pialwlc@gmail.com","name":"mvpia"},{"email":"nirmal@mixmax.com","name":"its-nimo"},{"email":"alexander.k@mixmax.com","name":"kohlhofer_mixmax"},{"email":"jakub@mixmax.com","name":"jtutaj"},{"email":"pedro@mixmax.com","name":"pedro-mixmax"},{"email":"alexander.simovic@gmail.com","name":"simalexan"},{"email":"graham@mixmax.com","name":"grahammixmax"},{"email":"jpdjeredjian@gmail.com","name":"jpdjere"},{"email":"bradavogel@gmail.com","name":"bradvogel"}],"readme":"# Nodemailer plugin for handling inline Base64 images as attachments\n\nThis plugin will convert base64-encoded images in your [nodemailer](https://github.com/nodemailer/nodemailer) email to be inline (\"CID-referenced\") attachments within the email. Inline attachments are useful because them embed the image inside the actual email, so it's viewable even if the user is checking their email without an internet connection. But if you're OK with requiring that the user be online to see the image, then consider hosting your images from AWS Cloudfront using [nodemailer-base64-to-s3](https://github.com/crocodilejs/nodemailer-base64-to-s3).\n\nBase64 images are generally a [bad idea](https://sendgrid.com/blog/embedding-images-emails-facts/) because they aren't supported in most email clients. This Nodemailer plugin will take base64 images in your email html in the form:\n\n    <img src=\"data:image/*;base64,...\">\n\nand replace it with a CID-referenced attachment that works in all email clients.\n\n## Install\n\n```\nyarn add nodemailer-plugin-inline-base64\n```\nor\n```\nnpm install nodemailer-plugin-inline-base64 --save\n```\n\n## Usage\n\n#### 1. Load the `nodemailer-plugin-inline-base64` plugin:\n\n```javascript\nvar inlineBase64 = require('nodemailer-plugin-inline-base64');\n```\n\n#### 2. Attach it as a 'compile' handler for a nodemailer transport object\n\n```javascript\nnodemailerTransport.use('compile', inlineBase64(options))\n```\nOptions allow to set CID prefix<sup><a href=\"#1\">1</a></sup> ```{cidPrefix: 'somePrefix_'}```,\nthen all inline images will have prefix in cid, i.e.: `cid:somePrefix_5fe3b631c651bdb1`. If you don't need this,\nyou can use inlineBase64 plugin without options.\n\n\n\n## Example\n\n```javascript\nvar nodemailer = require('nodemailer');\nvar inlineBase64 = require('nodemailer-plugin-inline-base64');\ntransporter.use('compile', inlineBase64({cidPrefix: 'somePrefix_'}));\ntransporter.sendMail({\n    from: 'me@example.com',\n    to: 'hello@mixmax.com',\n    html: '&lt;img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAACCAYAAACE7KJkAAAAI0lEQVRYR+3DMQ0AAAgDsKlFzZxgEhOcbdIEAIBf7Y6qqn8P0MMQZPno7TMAAAAASUVORK5CYII=\">'\n});\n```\n\n## References\n<sup id=\"1\">1</sup> It might be useful for reply email processing, example with [MailParser](https://github.com/andris9/mailparser)\n\n```javascript\nmp.on(\"attachment\", function(attachment, mail){\n    if (!attachment.contentId.includes('somePrefix')) { // process only images attached by user in reply\n        // ...\n    }\n});\n```\n\n## License\n\n**MIT**\n","readmeFilename":"README.md"}