{"_id":"coins-mail","_rev":"40-d57739feade1215eee734542cabaab79","name":"coins-mail","description":"HTML and text email templates for COINS.","dist-tags":{"latest":"4.0.7-1","next":"4.0.3"},"versions":{"2.0.0":{"name":"coins-mail","version":"2.0.0","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node test/server.js","test":"node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/coins-mail.git"},"bugs":{"url":"https://github.com/MRN-Code/coins-mail/issues"},"homepage":"https://github.com/MRN-Code/coins-mail#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.0.0-rc.3","autoprefixer":"^6.3.6","bookshelf":"^0.9.4","consolidate":"^0.14.0","html-minifier":"^1.5.0","inline-css":"^2.2.2","joi":"^8.0.5","lodash.assign":"^4.0.7","lodash.noop":"^3.0.1","node-sass":"^3.4.2","postcss":"^5.0.19","twig":"^0.8.9"},"devDependencies":{"cheerio":"^0.20.0","eslint":"^2.7.0","eslint-config-airbnb":"^6.2.0","eslint-plugin-react":"^4.3.0","istanbul":"^0.4.3","knex":"^0.10.0","livereload":"^0.4.1","pre-commit":"^1.1.2","sinon":"^1.17.3","tape":"^4.5.1"},"pre-commit":["lint","validate","test:coverage"],"gitHead":"6eebb7d097579980368896f163d1bc297b18869d","_id":"coins-mail@2.0.0","_shasum":"508ec586fe968551d314ebc02e4e6f30d1e35d64","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.10.1","_npmUser":{"name":"swashcap","email":"swashcap@gmail.com"},"dist":{"shasum":"508ec586fe968551d314ebc02e4e6f30d1e35d64","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-2.0.0.tgz","integrity":"sha512-7OrAkRvhHbIAdBvEHApCXczA53RuCspU2YUxaNBNyp3ZpyRvROweTqcCB+S0slQukMK/Zjm6lf2GqoLmaoGQQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWbvW3HQWKbCeGswSg72psxlaU9TaKejdu0DWRV1n+jgIgc4OkGTnNylGvlYES9bFJ5ZsFWsZKudicB3MtjJBA15I="}]},"maintainers":[{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/coins-mail-2.0.0.tgz_1460495270995_0.6258768057450652"}},"2.0.1":{"name":"coins-mail","version":"2.0.1","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node test/server.js","test":"node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/coins-mail.git"},"bugs":{"url":"https://github.com/MRN-Code/coins-mail/issues"},"homepage":"https://github.com/MRN-Code/coins-mail#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.0.0-rc.3","autoprefixer":"^6.3.6","bookshelf":"^0.9.4","consolidate":"^0.14.0","html-minifier":"^1.5.0","inline-css":"^2.2.2","joi":"^8.0.5","lodash.assign":"^4.0.7","lodash.noop":"^3.0.1","node-sass":"^3.4.2","postcss":"^5.0.19","twig":"^0.8.9"},"devDependencies":{"cheerio":"^0.20.0","eslint":"^2.7.0","eslint-config-airbnb":"^6.2.0","eslint-plugin-react":"^4.3.0","istanbul":"^0.4.3","knex":"^0.10.0","livereload":"^0.4.1","pre-commit":"^1.1.2","sinon":"^1.17.3","tape":"^4.5.1"},"pre-commit":["lint","validate","test:coverage"],"gitHead":"aa46ba309613ad4d1785c5514240af6cd05a1e55","_id":"coins-mail@2.0.1","_shasum":"8183210f1cfd363a99970f7b3717818705d4b55f","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.10.1","_npmUser":{"name":"swashcap","email":"swashcap@gmail.com"},"dist":{"shasum":"8183210f1cfd363a99970f7b3717818705d4b55f","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-2.0.1.tgz","integrity":"sha512-YYRPj1+wOX/YhjNqX8tytc1Gz+7tamoKkcTJqUmZ+/xRLkKcycHb324ci58Pe+GP/XQGQdg4saMKK6dLKwgcjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFdFw4CVwhonHGRdokb1H31S5SekDAVq9Nje2Bd/nZEPAiEAzDePYvCiWoGtPUribswGqjwTLbAffNoGRZW6KJbpkgA="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/coins-mail-2.0.1.tgz_1460496915872_0.7993789683096111"}},"2.0.2":{"name":"coins-mail","version":"2.0.2","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node test/server.js","test":"node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/coins-mail.git"},"bugs":{"url":"https://github.com/MRN-Code/coins-mail/issues"},"homepage":"https://github.com/MRN-Code/coins-mail#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.0.0-rc.3","autoprefixer":"^6.3.6","consolidate":"^0.14.0","html-minifier":"^1.5.0","inline-css":"^2.2.2","joi":"^8.0.5","lodash.assign":"^4.0.7","lodash.noop":"^3.0.1","node-sass":"^3.4.2","postcss":"^5.0.19","twig":"^0.8.9"},"devDependencies":{"bookshelf":"^0.9.4","cheerio":"^0.20.0","eslint":"^2.8.0","eslint-config-airbnb":"^7.0.0","eslint-plugin-react":"^4.3.0","istanbul":"^0.4.3","knex":"^0.10.0","livereload":"^0.4.1","pre-commit":"^1.1.2","sinon":"^1.17.3","tape":"^4.5.1"},"pre-commit":["lint","validate","test:coverage"],"gitHead":"d3560b153e9f8fc26108d75ea61a1e09e29d0ce6","_id":"coins-mail@2.0.2","_shasum":"311e08dbb504762108a53e26068ee0631199e51e","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"swashcap","email":"swashcap@gmail.com"},"dist":{"shasum":"311e08dbb504762108a53e26068ee0631199e51e","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-2.0.2.tgz","integrity":"sha512-Yq5L0nsA4qLhynX9DbYZ2OIhdfkMxEY+McAnBAPAFzH3oiI3sLNK80x5Hyhvqt1P9pKF6IEBjUwCt6QAYqH4Mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCon2viW7CV5beOhMOjcwOPN07pW/KhDXQUEXckzB4lvAIhAOokUTnJzvEyefwU8jI3ZSG3eJA2uytdsqi6MR3Kcw7y"}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/coins-mail-2.0.2.tgz_1461025315041_0.8323039358947426"}},"2.0.3":{"name":"coins-mail","version":"2.0.3","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node test/server.js","test":"node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/coins-mail.git"},"bugs":{"url":"https://github.com/MRN-Code/coins-mail/issues"},"homepage":"https://github.com/MRN-Code/coins-mail#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.0.0-rc.3","autoprefixer":"^6.3.6","consolidate":"^0.14.0","html-minifier":"^1.5.0","inline-css":"^2.2.2","joi":"^8.0.5","lodash.assign":"^4.0.7","lodash.noop":"^3.0.1","node-sass":"^3.4.2","postcss":"^5.0.19","twig":"^0.8.9"},"devDependencies":{"bookshelf":"^0.9.4","cheerio":"^0.20.0","eslint":"^2.8.0","eslint-config-airbnb":"^7.0.0","eslint-plugin-react":"^4.3.0","istanbul":"^0.4.3","knex":"^0.10.0","livereload":"^0.4.1","pre-commit":"^1.1.2","sinon":"^1.17.3","tape":"^4.5.1"},"pre-commit":["lint","validate","test:coverage"],"gitHead":"ec33a5c703ffd6bf9339599759f0656b5ed610e8","_id":"coins-mail@2.0.3","_shasum":"81694fde208b5af5fbc73b1bae9b79ea50498815","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"swashcap","email":"swashcap@gmail.com"},"dist":{"shasum":"81694fde208b5af5fbc73b1bae9b79ea50498815","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-2.0.3.tgz","integrity":"sha512-SejxuqepQaF4Hogn40xzEg7Y/wew3qLz5HF2Sgu08B3mqjyF2b+VCbRhYv+BomqmGn5r6lOfcsrkCHhiTnjvxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLyxjND5hDDUMRvKTAHPQNaCJzwnHC8ivARI/SNG7vOAiEA+szo9t61ebUChJtpB/+2F/zBeekHgHCVsPs9tzFyb7A="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/coins-mail-2.0.3.tgz_1461082610063_0.8910758956335485"}},"3.0.0":{"name":"coins-mail","version":"3.0.0","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.1.4","autoprefixer":"^6.3.6","bookshelf":"^0.10.2","consolidate":"^0.14.0","html-minifier":"^3.2.3","inline-css":"^2.2.2","joi":"^10.1.0","lodash.assign":"^4.0.7","lodash.noop":"^3.0.1","postcss":"^5.2.9","twig":"^0.10.3"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.12.2","eslint-config-airbnb-base":"^11.0.1","eslint-plugin-import":"^2.2.0","knex":"^0.12.6","livereload":"^0.6.0","nyc":"^10.0.0","pre-commit":"^1.2.2","sinon":"^1.17.3","tape":"^4.5.1"},"pre-commit":["lint","validate","test"],"_id":"coins-mail@3.0.0","_shasum":"854a2d7fb320f61c9dedf894ca42f6332ecabe76","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.4.0","_npmUser":{"name":"swashcap","email":"swashcap@gmail.com"},"dist":{"shasum":"854a2d7fb320f61c9dedf894ca42f6332ecabe76","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-3.0.0.tgz","integrity":"sha512-xn1tqQVwreMmyYMbeuKwM69YMtXZxTaepM2ykGIdGCKbBjP0kE6qSt2bcIsFGhU4bcuWalHpkF+4S7atYggySg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEGAYjJDF6PwXRp8nIq7i3WvmrfT80b5GW/wYgdptsROAiEA3imgPrrcUMYp8RBJu8H98FRfKaKfxuXtHFdFI0MP0GY="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/coins-mail-3.0.0.tgz_1485559460998_0.7096231249161065"}},"3.0.1":{"name":"coins-mail","version":"3.0.1","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.1.5","autoprefixer":"^6.7.6","bookshelf":"^0.10.3","consolidate":"^0.14.5","html-minifier":"^3.4.0","joi":"^10.2.2","juice":"^4.0.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.15","twig":"^1.10.4"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.12.2","eslint-config-airbnb-base":"^11.0.1","eslint-plugin-import":"^2.2.0","knex":"^0.12.7","livereload":"^0.6.0","nyc":"^10.1.2","pre-commit":"^1.2.2","sinon":"^1.17.7","tape":"^4.6.3"},"pre-commit":["lint","validate","test"],"_id":"coins-mail@3.0.1","_shasum":"f95b6ea750eba91055afb5005b82410c91b307da","_from":".","_npmVersion":"4.3.0","_nodeVersion":"7.7.2","_npmUser":{"name":"swashcap","email":"swashcap@gmail.com"},"dist":{"shasum":"f95b6ea750eba91055afb5005b82410c91b307da","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-3.0.1.tgz","integrity":"sha512-2QnvcpAohWbP+cYFUcmPQA5Y48XiSSfYR6QtvUcfCAmL5bEkWrfFDxC+B4ZOT9A65kZePbPebQzbVga3R5CGGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDu47escaLR4DXtdptKVnzBBfcq9Lpn4TpsEF3Q03DgwAIhAL3m8AMWN1NAs3GoDjXewFsTnxRBjQsc13dC5wQSQJY4"}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/coins-mail-3.0.1.tgz_1489093169449_0.026183865033090115"}},"3.0.2":{"name":"coins-mail","version":"3.0.2","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.1.5","autoprefixer":"^6.7.6","bookshelf":"^0.10.3","consolidate":"^0.14.5","html-minifier":"^3.4.0","joi":"^10.2.2","juice":"^4.0.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.15","twig":"^1.10.4"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.12.2","eslint-config-airbnb-base":"^11.0.1","eslint-plugin-import":"^2.2.0","knex":"^0.12.7","livereload":"^0.6.0","nyc":"^10.1.2","pre-commit":"^1.2.2","sinon":"^1.17.7","tape":"^4.6.3"},"pre-commit":["lint","validate","test"],"_id":"coins-mail@3.0.2","_shasum":"baaa70928c4b74caad5602efed511c805fb796d7","_from":".","_npmVersion":"4.6.1","_nodeVersion":"6.11.1","_npmUser":{"name":"swashcap","email":"swashcap@gmail.com"},"dist":{"shasum":"baaa70928c4b74caad5602efed511c805fb796d7","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-3.0.2.tgz","integrity":"sha512-7caABlP+xsCLlLVWpiqGy1OA+SjFmLSX2WB5c9Eyd+EYI7MdjNrH9vl1DGKW1i3NYfk1Rvka6apGsyis65/ARQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVxvPZgt3FX9bi0O2RhIp3+eaS4tVbKmZivxduQrcNwgIgRmp7GmuPwmV7sXWbJlquDKEGgZoOo9Jka9pTCp2uGnY="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"nidev","email":"nidev@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail-3.0.2.tgz_1500406631386_0.1058093928731978"}},"4.0.0":{"name":"coins-mail","version":"4.0.0","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.6.1","autoprefixer":"^6.7.7","bookshelf":"^0.10.3","consolidate":"^0.14.5","html-minifier":"^3.5.19","joi":"^10.6.0","juice":"^4.3.1","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.18","twig":"^1.12.0"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.19.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.13.0","knex":"^0.12.9","livereload":"^0.6.3","nyc":"^11.9.0","pre-commit":"^1.2.2","sinon":"^1.17.7","tape":"^4.9.1"},"pre-commit":["lint","validate","test"],"readme":"<img src=\"https://raw.githubusercontent.com/MRN-Code/quarterback/master/packages/coins-mail/img/coins-mail@2x.jpg\" width=\"450\" height=\"105\" alt=\"COINS Mail\" />\n\n_HTML and text email templates for COINS._\n\n## Example\n\n### Create Mail\n\nThe `createMail` is coins-mail’s chief export. It expects a configured [Bookshelf.js](http://bookshelfjs.org/) model:\n\n```js\nconst knex = require('knex')({\n  /* DB config ... */\n});\nconst bookshelf = require('bookshelf')(knex);\nconst createMail = require('coins-mail').createMail;\n\nconst MyMailModel = bookshelf.Model.extend({\n  tableName: 'my_table_name',\n});\n\ncreateMail(MyMailModel, options); // returns Promise\n```\n\n`createMail` returns a Promise. In the case of a single mail option, this is the result of calling [`save` on a Bookshelf.js model](http://bookshelfjs.org/#Model-instance-save). In the case of a collection of mail options, this is the result of [invoking `save` on the Bookshelf collection](http://bookshelfjs.org/#Collection-static-forge).\n\n#### Options:\n\n`options` can be either a mail options object or a collection of these objects:\n\n* `fromLabel` (string): Added to the `from_label` column. This is typically the name of application sending the email.\n* `recipients` (string or array of strings): Single recipient email address or a collection of email addresses.\n* `replyTo` (string): Email address to use in the email’s 'reply to' field.\n* `subject` (string): Email’s subject field.\n* `templateLocals` (object): Hash to pass to `getTemplate`. The keys/values depend on the email template in use (see `templateName`).\n* `sendTime` (string, defaults to `Date.now()`): Time to send the email.\n* `templateName` (string, defaults to “default“): Name of email template to use.\n\n#### Single email\n\n```js\n  createMail(MyMailModel, {\n    fromLabel: 'Test Application',,\n    recipients: [\n      'recipient-1@mrn.org',\n      'recipeint-2@mrn.org',\n      'recipient-3@mrn.org',\n      // ...\n    ],\n    replyTo: 'reply-address@mrn.org',\n    sendTime: Date.now() + 24 * 60 * 60 * 1000,\n    subject: 'Test Subject',\n    templateLocals: {\n      html: {\n        myHtmlTemplateVar: 'value',\n      },\n      text: {\n        myTextTemplateVar: 'value',\n      },\n    },\n    templateName: 'my-template',\n  })\n    .then(savedModel => console.log(savedModel))\n    .catch(error => console.error(error));\n```\n\n#### Multiple emails\n```js\n\ncreateMail(MyMailModel, [{\n  fromLabel: 'Test Application 1',\n  recipients: 'recipient-1@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 1',\n  templateLocals: // ...\n}, {\n  fromLabel: 'Test Application 2',\n  recipients: 'recipient-2@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 2',\n  templateLocals: // ...\n}, {\n  fromLabel: 'Test Application 3',\n  recipients: 'recipient-3@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 3',\n  templateLocals: // ...\n}])\n  .then(savedModels => {\n    savedModels.forEach(savedModel => console.log(savedModel));\n  })\n  .catch(error => console.error(error));\n```\n\n### Template\n\n```js\nconst getTemplate = require('coins-mail').getTemplate;\n\ngetTemplate({\n  html: {\n    myHtmlTemplateVar: '<h1>Hi!</h1> <p>Insert this html…</p>',\n  },\n  text: {\n    myTextTemplateVar: 'Alternative!\\n\\nFor the text version…',\n  },\n}, (error, result) => {\n  if (error) {\n    console.error(error);\n  } else {\n    console.log('HTML:', result.html);\n    console.log('Text:', result.text);\n  }\n});\n```\n\n`getTemplate` also returns a `Promise`:\n\n```js\ngetTemplate(myLocals)\n  .then(result => {\n    console.log('HTML:', result.html);\n    console.log('Text:', result.text);\n  })\n  .catch(error => console.error(error));\n```\n\n## License\n\nMIT. See [LICENSE](./LICENSE) for details.\n","readmeFilename":"README.md","_id":"coins-mail@4.0.0","_npmVersion":"6.0.1","_nodeVersion":"8.11.2","_npmUser":{"name":"jwtlake","email":"jwtlake@gmail.com"},"dist":{"integrity":"sha512-XosKUkZRQm4DgHWDg2thGes1UXVU+QAhMHDOg1wUmBLoKfQLPGnNNJMybT/PlwgaG3GRngeFEoycRWKxbEMrtQ==","shasum":"31a348da00d144ac5e88c5dd2e643bae76854096","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-4.0.0.tgz","fileCount":30,"unpackedSize":122462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbWIxOCRA9TVsSAnZWagAAimgQAJvMJyrh9hzvo8lyIr+F\n/XqKYxeevK0bBEDNTsWSN6saH4KoPndStYhPBhs9JgeCdOc/nwRYBKQYzDjk\nQ3ybb8wM2y2c4TFBhATOVXXys0RKJEdbV/TQyl/mL5/SGhedijfk7F2Bkmkp\nWif57xFSk+67Z0nrdJWwt2hXzwRCJQOGJOxUT2C6f6G+jNq8dVebADBqf0kP\ncO//OrEcRHQ29ZhrL9+y+ML00uPCb4AVhKVAfq27fVr7AYw/Ar/cwW4vXdLC\nZbgOU7pWXeDWuV8YypUwwZnf7FhanY41DilNBBAUAUv/3KYNpgwAqUiNAvL2\nKTuxKxcpR0f2LS4In9X+9kp24rAY0ZMy52unIWT72PH6/WsFJm27+AM9of/v\nnp96KcjpZMKBMLK/5x3Ie8qmiAPGkF/llyOMAoHiFFJrRXBEce+zV+4Yxyhb\nIViqXVsx1spgfbMG/YLpU5zc2t6BOXM+XdrFwmf1+7ygfQQEhUZBpcTGtEWx\nPYUUiyN834gOr+mw9SUpitLYONatS0jBUPkAVifTor9kC1NcCuuNPVp3UY/c\nGPRKeDPa8YRzY8o3Qd/sXlx0XDwH1BwFC+Bs2rTxwBbUFU34d44Q6lR46ibx\nDRrEIgYMlrjpLvcJEN5mSD2t77j1n1IvN1qMWqA3Bx5uzly4y7VuE9coD1bB\n/u6/\r\n=PnUp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICQP+2pxNIGUZlKsFaLHZwd8QGxZdtAUzopKaOX4RfRvAiAR7e9h4gM92m+hfdwSUIQT13MURRulrgXeBKwQ+abnMQ=="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"nidev","email":"nidev@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail_4.0.0_1532529742299_0.42261535962162533"},"_hasShrinkwrap":false},"4.0.1":{"name":"coins-mail","version":"4.0.1","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.6.1","autoprefixer":"^6.7.7","bookshelf":"^0.10.4","consolidate":"^0.14.5","html-minifier":"^3.5.19","joi":"^10.6.0","juice":"^4.3.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.18","twig":"^1.12.0"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.19.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.13.0","knex":"^0.12.9","livereload":"^0.6.3","nyc":"^11.9.0","pre-commit":"^1.2.2","sinon":"^1.17.7","tape":"^4.9.1"},"pre-commit":["lint","validate","test"],"readme":"<img src=\"https://raw.githubusercontent.com/MRN-Code/quarterback/master/packages/coins-mail/img/coins-mail@2x.jpg\" width=\"450\" height=\"105\" alt=\"COINS Mail\" />\n\n_HTML and text email templates for COINS._\n\n## Example\n\n### Create Mail\n\nThe `createMail` is coins-mail’s chief export. It expects a configured [Bookshelf.js](http://bookshelfjs.org/) model:\n\n```js\nconst knex = require('knex')({\n  /* DB config ... */\n});\nconst bookshelf = require('bookshelf')(knex);\nconst createMail = require('coins-mail').createMail;\n\nconst MyMailModel = bookshelf.Model.extend({\n  tableName: 'my_table_name',\n});\n\ncreateMail(MyMailModel, options); // returns Promise\n```\n\n`createMail` returns a Promise. In the case of a single mail option, this is the result of calling [`save` on a Bookshelf.js model](http://bookshelfjs.org/#Model-instance-save). In the case of a collection of mail options, this is the result of [invoking `save` on the Bookshelf collection](http://bookshelfjs.org/#Collection-static-forge).\n\n#### Options:\n\n`options` can be either a mail options object or a collection of these objects:\n\n* `fromLabel` (string): Added to the `from_label` column. This is typically the name of application sending the email.\n* `recipients` (string or array of strings): Single recipient email address or a collection of email addresses.\n* `replyTo` (string): Email address to use in the email’s 'reply to' field.\n* `subject` (string): Email’s subject field.\n* `templateLocals` (object): Hash to pass to `getTemplate`. The keys/values depend on the email template in use (see `templateName`).\n* `sendTime` (string, defaults to `Date.now()`): Time to send the email.\n* `templateName` (string, defaults to “default“): Name of email template to use.\n\n#### Single email\n\n```js\n  createMail(MyMailModel, {\n    fromLabel: 'Test Application',,\n    recipients: [\n      'recipient-1@mrn.org',\n      'recipeint-2@mrn.org',\n      'recipient-3@mrn.org',\n      // ...\n    ],\n    replyTo: 'reply-address@mrn.org',\n    sendTime: Date.now() + 24 * 60 * 60 * 1000,\n    subject: 'Test Subject',\n    templateLocals: {\n      html: {\n        myHtmlTemplateVar: 'value',\n      },\n      text: {\n        myTextTemplateVar: 'value',\n      },\n    },\n    templateName: 'my-template',\n  })\n    .then(savedModel => console.log(savedModel))\n    .catch(error => console.error(error));\n```\n\n#### Multiple emails\n```js\n\ncreateMail(MyMailModel, [{\n  fromLabel: 'Test Application 1',\n  recipients: 'recipient-1@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 1',\n  templateLocals: // ...\n}, {\n  fromLabel: 'Test Application 2',\n  recipients: 'recipient-2@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 2',\n  templateLocals: // ...\n}, {\n  fromLabel: 'Test Application 3',\n  recipients: 'recipient-3@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 3',\n  templateLocals: // ...\n}])\n  .then(savedModels => {\n    savedModels.forEach(savedModel => console.log(savedModel));\n  })\n  .catch(error => console.error(error));\n```\n\n### Template\n\n```js\nconst getTemplate = require('coins-mail').getTemplate;\n\ngetTemplate({\n  html: {\n    myHtmlTemplateVar: '<h1>Hi!</h1> <p>Insert this html…</p>',\n  },\n  text: {\n    myTextTemplateVar: 'Alternative!\\n\\nFor the text version…',\n  },\n}, (error, result) => {\n  if (error) {\n    console.error(error);\n  } else {\n    console.log('HTML:', result.html);\n    console.log('Text:', result.text);\n  }\n});\n```\n\n`getTemplate` also returns a `Promise`:\n\n```js\ngetTemplate(myLocals)\n  .then(result => {\n    console.log('HTML:', result.html);\n    console.log('Text:', result.text);\n  })\n  .catch(error => console.error(error));\n```\n\n## License\n\nMIT. See [LICENSE](./LICENSE) for details.\n","readmeFilename":"README.md","_id":"coins-mail@4.0.1","_npmVersion":"6.0.1","_nodeVersion":"8.11.2","_npmUser":{"name":"jwtlake","email":"jwtlake@gmail.com"},"dist":{"integrity":"sha512-MuYZvWMas0p6xVWw3lNWR48+Irn+g7mEy2zmviGAgJoDH0Y8d4DiymjYj9otaNKD6x4UIaKtPY6F5SkfjdmuVQ==","shasum":"e7cd8be5e0a373aa6cfcbca283ed189738e8d8a3","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-4.0.1.tgz","fileCount":30,"unpackedSize":122927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYfIOCRA9TVsSAnZWagAA3HkP/AyXbQwjbI9MajKhp7Mg\nwd8SNIHp5f+kVYECzcNvipstFPxE6fPnzSnw4ptsG9OTD/pu90gBd5rFP+CR\nwhUyFrqXZpcZ9p0GQhbmFCIOcu7q3AEDtBH/zLGpUk3SAcLcbMDabcBkzQG7\nycTsROoZKQJEm24xuSLlC0Vs++PUWERSjHUiUaCM7tUPMLpSeZngRWnvBS6j\n5884mzRlwjhFxOHFSfNyL33PpbnnWFtOdL1y1MgXZ9lrJm2PigOg5RM1rblZ\nXpDWDe+jR6SO+q86NsHy7Vk2OEz9jUcBOm6EatRk+QUS+8WpVBs1owa+8f9f\n7pIMouhlQ7c5z/GGG+ZIKjuZQC+QN1T7S21teZDgnZlieHhct3TFsCHWlHhc\njfeuuVXcxnTMnSCqBRBQ/9ecDUHOoQpTTl0CCE3bQbQDojV26SKZAkeMJw08\nmRNWLkilO3bYyjXlC6ZWwNQPjNhghAihwNNUYkFGHPimu/JJCOfUllSqSxyR\nwWCdBgLqbqbB9ao/uIEsGrdZkw237DaOLP4czoSEpgGQRJK0lPTeSMjl6ADi\nBj3g3BZ8hhJiUySLiV5LAJnudpF/TPf/xV52fkC3ZHSZRApxVEEiAYQenaaZ\nxyK6UJbYiKnMxLUnr3/rsJKNh1YuUXsScCgaTF1tYgwYkCNbiIl6iQVXGHwH\nbRNX\r\n=nYtM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICTF/rxFXXCWYaWtc0sWo3KvnD2CUW9ozTjgshKGjulwAiBp0d6j/lwM14GO2qSrf3qTX+m3O6cwJw/4YI3j/SGbwg=="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"nidev","email":"nidev@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail_4.0.1_1533145614194_0.5509891384958605"},"_hasShrinkwrap":false},"4.0.2":{"name":"coins-mail","version":"4.0.2","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","preversion":"git checkout master && git pull && npm ls","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.6.1","autoprefixer":"^6.7.7","bookshelf":"^0.10.4","consolidate":"^0.14.5","html-minifier":"^3.5.19","joi":"^10.6.0","juice":"^4.3.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.18","twig":"^1.12.0"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.19.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.13.0","knex":"^0.12.9","livereload":"^0.6.3","nyc":"^11.9.0","pre-commit":"^1.2.2","sinon":"^6.1.4","tape":"^4.9.1"},"pre-commit":["lint","validate","test"],"_id":"coins-mail@4.0.2","_npmVersion":"6.0.1","_nodeVersion":"8.11.2","_npmUser":{"name":"jwtlake","email":"jwtlake@gmail.com"},"dist":{"integrity":"sha512-uMDYtq8SK9lf7ixLEqJO4m01vzNwwO7x5YebwBRQCMzBeHBmXxDz+ipdu8JndKs/f/iyDbKHgprpMDa9R2pDHg==","shasum":"2a1e3714f693a2390f1ef718a25a131b8729c093","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-4.0.2.tgz","fileCount":30,"unpackedSize":122926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaLFjCRA9TVsSAnZWagAAb2UP/iCpsBrf8q88JhfNDgkb\nfCuOHqDRyAUp/uaYlZri8B976eVNmClagpHd07Rr4lnzy2OnYrY2XEpOmz6B\nIcFf4woNyK+B/r0U8L5TU2lou/p+/gbXpYsF4ZzLDEiQaT0uoDO1lbo6vbge\ncxGEeU+ix77b6d4hLI+m5lDdrlsI84KuxEy6UC4UPtf73CIiGHqEwTrL5R1F\nFPSwfLrPJeNbnV4s4A6dsaWhH4FsAowlLRcxBU3MJBGEnP8fkbBtV49EYR8B\nfkSBrW3LbyylPzzk2Oep6tyZEZHOU3/wL0z3WQLlDdVtHbWr7qOSz0sbeX8Y\n1iTwI/mm6y/GGP/sF/o5bp4ZDWoREeYCGf5Zq8iwGNNjOfgC1dFx9/YIRetv\n4aAPL/Hb6zkTvqW+ahf/LlRVZDmGbPLm9RoXGX4X1nGPUrRrNq6iUgVwRvR1\n/P1vakGJdyvbXeGmH6GDH/Q5infFpitdek6CkqpJYc8dXXURxHXgWatwQfy1\n8rh+vbOXSRD03t1qr6Y5iGXlQiLrxmnF/1GTgw2JPq+GYlLkqGrIfD3RbPYR\nHdbIC3mwPPVYEVFbY9mQduXjtpGvcTlAPJ4LMMUKLkZibp83kvZNlG911Kwv\nAspbrE1aPXWE1tEM+jP/A0lPgd+WlAFFlOqpcu9Md159gUDwFBFX+v39sUY2\nLh1U\r\n=cgvX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB7Y8t3Kzigx6UBg7w9O1Sug952dVYfr6h3nOBhSULpRAiEAxSfWD3vScQ730P08aFXCpGpPuP3SBnRRMX4L72ZVI1U="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"nidev","email":"nidev@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail_4.0.2_1533587811127_0.6120256056129345"},"_hasShrinkwrap":false},"4.0.3":{"name":"coins-mail","version":"4.0.3","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.6.1","autoprefixer":"^6.7.7","bookshelf":"^0.10.4","consolidate":"^0.14.5","html-minifier":"^3.5.19","joi":"^10.6.0","juice":"^4.3.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.18","twig":"^1.12.0"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.19.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.13.0","knex":"^0.12.9","livereload":"^0.6.3","nyc":"^11.9.0","pre-commit":"^1.2.2","sinon":"^6.1.4","tape":"^4.9.1"},"pre-commit":["lint","validate","test"],"readme":"<img src=\"https://raw.githubusercontent.com/MRN-Code/quarterback/master/packages/coins-mail/img/coins-mail@2x.jpg\" width=\"450\" height=\"105\" alt=\"COINS Mail\" />\n\n_HTML and text email templates for COINS._\n\n## Example\n\n### Create Mail\n\nThe `createMail` is coins-mail’s chief export. It expects a configured [Bookshelf.js](http://bookshelfjs.org/) model:\n\n```js\nconst knex = require('knex')({\n  /* DB config ... */\n});\nconst bookshelf = require('bookshelf')(knex);\nconst createMail = require('coins-mail').createMail;\n\nconst MyMailModel = bookshelf.Model.extend({\n  tableName: 'my_table_name',\n});\n\ncreateMail(MyMailModel, options); // returns Promise\n```\n\n`createMail` returns a Promise. In the case of a single mail option, this is the result of calling [`save` on a Bookshelf.js model](http://bookshelfjs.org/#Model-instance-save). In the case of a collection of mail options, this is the result of [invoking `save` on the Bookshelf collection](http://bookshelfjs.org/#Collection-static-forge).\n\n#### Options:\n\n`options` can be either a mail options object or a collection of these objects:\n\n* `fromLabel` (string): Added to the `from_label` column. This is typically the name of application sending the email.\n* `recipients` (string or array of strings): Single recipient email address or a collection of email addresses.\n* `replyTo` (string): Email address to use in the email’s 'reply to' field.\n* `subject` (string): Email’s subject field.\n* `templateLocals` (object): Hash to pass to `getTemplate`. The keys/values depend on the email template in use (see `templateName`).\n* `sendTime` (string, defaults to `Date.now()`): Time to send the email.\n* `templateName` (string, defaults to “default“): Name of email template to use.\n\n#### Single email\n\n```js\n  createMail(MyMailModel, {\n    fromLabel: 'Test Application',,\n    recipients: [\n      'recipient-1@mrn.org',\n      'recipeint-2@mrn.org',\n      'recipient-3@mrn.org',\n      // ...\n    ],\n    replyTo: 'reply-address@mrn.org',\n    sendTime: Date.now() + 24 * 60 * 60 * 1000,\n    subject: 'Test Subject',\n    templateLocals: {\n      html: {\n        myHtmlTemplateVar: 'value',\n      },\n      text: {\n        myTextTemplateVar: 'value',\n      },\n    },\n    templateName: 'my-template',\n  })\n    .then(savedModel => console.log(savedModel))\n    .catch(error => console.error(error));\n```\n\n#### Multiple emails\n```js\n\ncreateMail(MyMailModel, [{\n  fromLabel: 'Test Application 1',\n  recipients: 'recipient-1@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 1',\n  templateLocals: // ...\n}, {\n  fromLabel: 'Test Application 2',\n  recipients: 'recipient-2@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 2',\n  templateLocals: // ...\n}, {\n  fromLabel: 'Test Application 3',\n  recipients: 'recipient-3@mrn.org'\n  replyTo: 'reply-address@mrn.org',\n  subject: 'Test Subject 3',\n  templateLocals: // ...\n}])\n  .then(savedModels => {\n    savedModels.forEach(savedModel => console.log(savedModel));\n  })\n  .catch(error => console.error(error));\n```\n\n### Template\n\n```js\nconst getTemplate = require('coins-mail').getTemplate;\n\ngetTemplate({\n  html: {\n    myHtmlTemplateVar: '<h1>Hi!</h1> <p>Insert this html…</p>',\n  },\n  text: {\n    myTextTemplateVar: 'Alternative!\\n\\nFor the text version…',\n  },\n}, (error, result) => {\n  if (error) {\n    console.error(error);\n  } else {\n    console.log('HTML:', result.html);\n    console.log('Text:', result.text);\n  }\n});\n```\n\n`getTemplate` also returns a `Promise`:\n\n```js\ngetTemplate(myLocals)\n  .then(result => {\n    console.log('HTML:', result.html);\n    console.log('Text:', result.text);\n  })\n  .catch(error => console.error(error));\n```\n\n## License\n\nMIT. See [LICENSE](./LICENSE) for details.\n","readmeFilename":"README.md","_id":"coins-mail@4.0.3","_npmVersion":"6.4.0","_nodeVersion":"8.11.3","_npmUser":{"name":"jwtlake","email":"jwtlake@gmail.com"},"dist":{"integrity":"sha512-ZzwLDuJxOA5vaY+0iMEa02bMn40ZrOZr0FXjO0l8Qh+U6BIn5LcSRlCDEdHYU4eTMLTm6cT9iojbRwghPyzDSQ==","shasum":"ae214b51fa075ef3e9d26bdebf588d8b15b6eb08","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-4.0.3.tgz","fileCount":30,"unpackedSize":122527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhYyeCRA9TVsSAnZWagAAN6IQAI0XUpbgrjftNJEIZCaK\nIIDjvfiCuRzU9Cm+sLH2rfg7ft9+l0SokgCMM1w/J2mw88nDGkGGEM7uwjIv\nlxUHRS4+ABp02O2tGXhl5YbE5Rh5tK3tClWWGOEM9P6JmXMb8KQz6NPaxnsp\nK3H2R7uPCOc+uNrZs4eheidc9BzrCitxNu+KLntjm5x69ZFR3jShyCumqPeW\n4ZY9mE+fsjGsGfKT0O5/VeKxDLELEuiDQsX1Pp62OyzF8ZCIrE7LcT78431Y\ncVfuTapXmT6hQZgISapEln+DnzBF6P0O+JufNwCw+ZIBcRVBBlhFBjwgzIIK\nEf6PcMffjMSfuo1A6XInAvYUA2mzOvDB8OJnjlQ0T412xWoujDXODwokt3c2\nRN6e5lssib1/xLnTdFjtPQ4xEVye3QZlwIVyWoaDKFu9DtRpCXZHlKzti3/7\nvszgP9jj9EdwPX18xFB/ZUIZOF+r0Ec3eUiiVlFM6MiZ6hz7TrjIIE8FDBST\nAYRHl3lNp0dqC28Hve/OFtPadSVVMiq/uJLCnzxS4U0benAEYq/rdiJvrlzO\n+BM0U3oLyhgzlC6+6C0CQY4BX5w/N2qmZYffEOdqfPWrTF07lkPgHtt2Pxw/\ny4ZyccWGop3ljDJ2XIzUiF505McK9nBTu9k8ytfRGouxVt3U37J6IocjH4P/\nY7aJ\r\n=laP9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMXpA4Kx3LRXEYMezmtLrpTGKDZ2RfzvnjsNYtzlQzWAiAVkKeEPB50o1wE28XMOJzfWUPpHp2pWla0duBSvkZlmw=="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"nidev","email":"nidev@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail_4.0.3_1535478941885_0.39048669763727406"},"_hasShrinkwrap":false},"4.0.4":{"name":"coins-mail","version":"4.0.4","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.6.1","autoprefixer":"^6.7.7","bookshelf":"^0.10.4","consolidate":"^0.14.5","html-minifier":"^3.5.19","joi":"^10.6.0","juice":"^4.3.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.18","twig":"^1.12.0"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.19.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.13.0","knex":"^0.12.9","livereload":"^0.6.3","nyc":"^11.9.0","pre-commit":"^1.2.2","sinon":"^6.1.4","tape":"^4.9.1"},"pre-commit":["lint","validate","test"],"_id":"coins-mail@4.0.4","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"jwtlake","email":"jwtlake@gmail.com"},"dist":{"integrity":"sha512-ze2xfVIbeJRnAg6QdTctSbBUtxlMWTNmjQCsksj5oQtRcMcEiBw6UpRoas8y4C2q24ZwDFr/7jnmE3Jo+02JzA==","shasum":"52137fe5079fe78c49bf24bc4f01c9c775e54dfd","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-4.0.4.tgz","fileCount":30,"unpackedSize":122699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4Jd7CRA9TVsSAnZWagAAY1MQAIp90BRny0GGnenS1Dgs\nA07xCE9qFLVnVgqTszn/t449YfuGSIa2sJvFZpZF000/Q8RsHYGvw4OXqIfg\n8w6Sszm0McVsko3hwuNWLK2las5VrhCf/Zk9STjOkK6KGHzeaYLoVegfvjVG\nRKg51n3NwVPQT4CnxyT5v/awTftI42WK/3gHI6dRgwTDSsdVggYA3eZCxpSD\njVG7QEYUkSWH5S7bYxT6/1YAg186IJMGqBVyZ6zsvKYlpUvKU6HXt1TsO2Pf\nsV0EZECS3IIaGPRDHoc4/ohqZGvPq11JlaoF04VOg1KZ6oYbxtBtzeY+HIlb\nRd3eDdIMJ6+ZD6m2l2hRrYO2SacydAiVVGQZfLgw3CxbpNYPp/5xhgB2bQ9x\nxSIZ6QIEXAy9Uujdf18OkENFHw/XZEOE7FlmWweP0hqUkEcWUsPYaEaz6Zmw\nOwl7N8X2Ip9A++XTrnBOsmKl5+98PKp3k13UKtGYvfJz8eR1SHOwMADnKcVx\nzQTplNS1rr23mb9NTlrSxyy6lTADCRvuk9GRs54XeYCpW+sUSDHV0Ah3NSHl\nqoTk8boOGqfHiIwUITwVo/WQd+KFIjAi0fS6MIDG90AIzbqiSnakULW5UDr+\nEgIEKljzBlv8355lFSGy3UvUCLFNZN1lJjwbIt89VZ9spLbAApm1tgnb5VXc\nyiAA\r\n=Pxnj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4+shR8ZqNRZDm6j0LaTHwp4NU6lm/lNpGpmlK1iJLlgIgNOsl1dogf5xwMl+2kihqnnHP1SJGx1EoZ9qvR7JThwU="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"nidev","email":"nidev@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail_4.0.4_1558222714957_0.35698701761723584"},"_hasShrinkwrap":false},"4.0.5":{"name":"coins-mail","version":"4.0.5","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.6.1","autoprefixer":"^6.7.7","bookshelf":"^0.10.4","consolidate":"^0.14.5","html-minifier":"^3.5.19","joi":"^10.6.0","juice":"^4.3.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.18","twig":"^1.12.0"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.19.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.13.0","knex":"^0.12.9","livereload":"^0.6.3","nyc":"^11.9.0","pre-commit":"^1.2.2","sinon":"^6.1.4","tape":"^4.9.1"},"pre-commit":["lint","validate","test"],"_id":"coins-mail@4.0.5","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-qlx+gfcYoevf5PeIi8H6InHTXvHQEmFyWkW2yfwZBDbcKf2ZsFyM8edEAlJQopNjlK1QtDlQ1L/RJngh4e0Ehg==","shasum":"a08d0b5a3ea394ab893a0a65fcb65c9f57b92234","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-4.0.5.tgz","fileCount":30,"unpackedSize":122687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJds23/CRA9TVsSAnZWagAArp0P/i0oeiKdizltx5KX52Ns\nRqiQxkHquXMVIe3zHdjxh8ugpzu/l/+SkkMgAppw83GLDjixfQFbOoQfOvNC\nVNl/w+jHMjYnia+NQTm/qvLLZmdL3a/jkH+6g47IGxZRELOyDn5hISNsl/v3\ny033+N2T4p6fkDzPc24pjOH4w67KVrsnwfbLkpwowdfJdPtzzjKGKZxEbIqb\nhVw2nOnYlIDkJHJ7ZvFON35jTTcchv7LhONumSCzv1tB52dLObVLiLnrwEwN\n6KqGIlbLT8dEHRj+eiD+jwvA4hdifNCfroHa217hog7NkfvU4GfQk2aZ3EHs\nOs62wq0nYU4QAfmwzcl4TPiCTV854J45na/P806ar4vVT5pHDgHABN4mLKGH\nX1cRQLJr7KlquMX1UiVYrXIY3l6JZXDxiyj3v7gFtqj32k/UqE7xsoAdauzE\nK/HESTEmeqEXbdQj5vTFUWQ/bxa54D5zkGBaPE8tk8zg50GJxqIzC2wTG1Ow\nkXReyHFLKpBR+J5vglgctEiPX8+EvofemY0p/FnnBuH/aJIefGSSwB3y+xmG\ny/bcLemChcSVgDCqOUG5wqekOLvP+K5R/UqMzm96+8TGLfXHN/reWpM9YL8Z\nw6mQNVQ6iterDAMgJD0oC3nviENkPZvHjnfoDQzS5xWYtHD4Zk6HLL2EcqUl\nLvIZ\r\n=uYxm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDp7+bsIWtdqy8jnP566Yuu12o5rhZcfoqVqD4z/D1uhAIhAMbgiFu2Jz3R8rOYWHRzAwRm+BaYmredpdHAMxdKNIJ2"}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone@mrn.org"},{"name":"nidev","email":"nidev@mrn.org"},{"name":"rsskmr","email":"rkelly@mrn.org"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"}],"_npmUser":{"name":"mstone121","email":"mstone121@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail_4.0.5_1572040191522_0.34396216478777486"},"_hasShrinkwrap":false},"4.0.6":{"name":"coins-mail","version":"4.0.6","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.6.1","autoprefixer":"^6.7.7","bookshelf":"^0.10.4","consolidate":"^0.14.5","html-minifier":"^3.5.19","joi":"^10.6.0","juice":"^4.3.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.18","twig":"^1.12.0"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.19.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.13.0","knex":"^0.12.9","livereload":"^0.6.3","nyc":"^11.9.0","pre-commit":"^1.2.2","sinon":"^6.1.4","tape":"^4.9.1"},"pre-commit":["lint","validate","test"],"_id":"coins-mail@4.0.6","_nodeVersion":"12.13.0","_npmVersion":"6.13.0","dist":{"integrity":"sha512-CQQFbwa2K79oViN4OUYFETsYldiRoeAxORAFzkaU9Zni0dP+N9BPoOFuJdeSQ7NnyMXsyVLVRJg7FNGBYIN8Zw==","shasum":"965e897661faacd240cbca71e7019189ae4fdc48","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-4.0.6.tgz","fileCount":30,"unpackedSize":123051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjeZcCRA9TVsSAnZWagAANnIP/RlhsK5vxXO0SDC4HrCs\nc/zv9zj+QXNB5jS95/hiWGls7rKmj+mLi3JSQcJoPtoMTMDbVqJru3QDcbAi\nsr+oiR2Bea8kQDAfY+4kWiTQgET7OQGOU0GoKaWqq4KEGBxHtQEAlGp6Vhw0\nvI77Xzvtl8u8KQsFUVCDVGsn5z9DLVDMS96NN+RUqGzpBLJ0f5CIAteRGWqh\n+LSj1c5LB2L3aQxEZvYd1rdeFZBsVOe9BoU3/vpjVNHrWQrikwFC0BWWJtFX\npmgiLaz55RkHHvJzJZ+7wUfD423DFaA4MosapDw1XpUNYFja27hKzm/lsez/\nt6YCdL3Zgvi+G5ObYifhVLP9tUFk1sh5Xye4ny2Ws2ug7bqtOcEZZZv3O26P\n/GFnwJp2i7bNC3qoU/HiQXjUNj3jm51GmVmo8xgwhmT9BT7MYP79EQ3pe5j0\nSvOgmAE7IuD9yHfiCF0zX+Jv9EBr5+duHWs2o+nGXkjJRE6UuK1g5jck9FT9\nZSUG3I8pblwgAZD82CmDPPrQt4CYEZdQ6BtUHN5JFtcUNNFBJLsf7Ac6nCyA\n87/x4ZJQ2u3dx8NbRIC/BwC8UURJK5tPLY9J4Sc1o1Af8rnkF0jWFNTJzS/v\nPsEth29amWQVWBhPBd7v4iLpjgceL2bqeU44d21RZm+XdVZnH8Umvx6gIPMJ\nkd6o\r\n=MKe8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtDTH8+Spq/h6RHSSwtXh8wjGL7ttnTsel5YkeQofRUgIhANpgrkdHcMj5KD+8L2QxjS+Ig1ryK7ihVVLMi9AUmxGA"}]},"maintainers":[{"name":"nidev","email":"nidev@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"},{"name":"rsskmr","email":"rssktt+npm@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone121@gmail.com"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"smuttavarapu","email":"smuttavarapu@mrn.org"}],"_npmUser":{"name":"jwtlake","email":"jwtlake@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail_4.0.6_1603135067967_0.1976746257656412"},"_hasShrinkwrap":false},"4.0.7-1":{"name":"coins-mail","version":"4.0.7-1","description":"HTML and text email templates for COINS.","main":"src/index.js","directories":{"test":"test"},"scripts":{"lint":"eslint server src test","start":"node server/index.js","test":"nyc --reporter=lcov node test/index.js","test:coverage":"istanbul cover test/index.js","validate":"npm ls"},"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"author":{"name":"Cory Reed","email":"creed@mrn.org"},"license":"MIT","dependencies":{"async":"^2.6.1","autoprefixer":"^6.7.7","bookshelf":"^0.10.4","consolidate":"^0.14.5","html-minifier":"^3.5.19","joi":"^10.6.0","juice":"^4.3.2","lodash.assign":"^4.2.0","lodash.noop":"^3.0.1","postcss":"^5.2.18","twig":"^1.12.0"},"devDependencies":{"cheerio":"^0.22.0","eslint":"^3.19.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.13.0","knex":"^0.12.9","livereload":"^0.6.3","nyc":"^11.9.0","pre-commit":"^1.2.2","sinon":"^6.1.4","tape":"^4.9.1"},"pre-commit":["lint","validate","test"],"gitHead":"5d6506f7ad22cc48e4cdc988443e420617ee18c1","_id":"coins-mail@4.0.7-1","_nodeVersion":"18.16.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-sqPYl1a3PU5aLAouWg9wOzkpWX7tT9CLXmngG/fhfEDcHuLTj6GeJBsPs/e3xyE/sfuQhwCScpAis15KTbSjTg==","shasum":"fd11438cb9f1bd9029ae1a113f9cc8960488e8e0","tarball":"https://registry.npmjs.org/coins-mail/-/coins-mail-4.0.7-1.tgz","fileCount":30,"unpackedSize":126026,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEKBNUhGY8sF/EYuABEjjqBcsSouQI7AEw8V9Qr1JMNFAiBKBMxnojc+ESPTgm5/BlEBq7W+YwWqyYnnT/q3KTuh9A=="}]},"_npmUser":{"name":"amrvignesh","email":"amrv1990@gmail.com"},"maintainers":[{"name":"nidev","email":"nidev@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"},{"name":"rsskmr","email":"rssktt+npm@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone121@gmail.com"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"smuttavarapu","email":"smuttavarapu@mrn.org"},{"name":"amrvignesh","email":"amrv1990@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coins-mail_4.0.7-1_1694546881664_0.8723433511661531"},"_hasShrinkwrap":false}},"readme":"<img src=\"https://raw.githubusercontent.com/MRN-Code/quarterback/master/packages/coins-mail/img/coins-mail@2x.jpg\" width=\"450\" height=\"105\" alt=\"COINS Mail\" />\r\n\r\n_HTML and text email templates for COINS._\r\n\r\n## Example\r\n\r\n### Create Mail\r\n\r\nThe `createMail` is coins-mail’s chief export. It expects a configured [Bookshelf.js](http://bookshelfjs.org/) model:\r\n\r\n```js\r\nconst knex = require('knex')({\r\n  /* DB config ... */\r\n});\r\nconst bookshelf = require('bookshelf')(knex);\r\nconst createMail = require('coins-mail').createMail;\r\n\r\nconst MyMailModel = bookshelf.Model.extend({\r\n  tableName: 'my_table_name',\r\n});\r\n\r\ncreateMail(MyMailModel, options); // returns Promise\r\n```\r\n\r\n`createMail` returns a Promise. In the case of a single mail option, this is the result of calling [`save` on a Bookshelf.js model](http://bookshelfjs.org/#Model-instance-save). In the case of a collection of mail options, this is the result of [invoking `save` on the Bookshelf collection](http://bookshelfjs.org/#Collection-static-forge).\r\n\r\n#### Options:\r\n\r\n`options` can be either a mail options object or a collection of these objects:\r\n\r\n* `fromLabel` (string): Added to the `from_label` column. This is typically the name of application sending the email.\r\n* `recipients` (string or array of strings): Single recipient email address or a collection of email addresses.\r\n* `replyTo` (string): Email address to use in the email’s 'reply to' field.\r\n* `subject` (string): Email’s subject field.\r\n* `templateLocals` (object): Hash to pass to `getTemplate`. The keys/values depend on the email template in use (see `templateName`).\r\n* `sendTime` (string, defaults to `Date.now()`): Time to send the email.\r\n* `templateName` (string, defaults to “default“): Name of email template to use.\r\n\r\n#### Single email\r\n\r\n```js\r\n  createMail(MyMailModel, {\r\n    fromLabel: 'Test Application',,\r\n    recipients: [\r\n      'recipient-1@mrn.org',\r\n      'recipeint-2@mrn.org',\r\n      'recipient-3@mrn.org',\r\n      // ...\r\n    ],\r\n    replyTo: 'reply-address@mrn.org',\r\n    sendTime: Date.now() + 24 * 60 * 60 * 1000,\r\n    subject: 'Test Subject',\r\n    templateLocals: {\r\n      html: {\r\n        myHtmlTemplateVar: 'value',\r\n      },\r\n      text: {\r\n        myTextTemplateVar: 'value',\r\n      },\r\n    },\r\n    templateName: 'my-template',\r\n  })\r\n    .then(savedModel => console.log(savedModel))\r\n    .catch(error => console.error(error));\r\n```\r\n\r\n#### Multiple emails\r\n```js\r\n\r\ncreateMail(MyMailModel, [{\r\n  fromLabel: 'Test Application 1',\r\n  recipients: 'recipient-1@mrn.org'\r\n  replyTo: 'reply-address@mrn.org',\r\n  subject: 'Test Subject 1',\r\n  templateLocals: // ...\r\n}, {\r\n  fromLabel: 'Test Application 2',\r\n  recipients: 'recipient-2@mrn.org'\r\n  replyTo: 'reply-address@mrn.org',\r\n  subject: 'Test Subject 2',\r\n  templateLocals: // ...\r\n}, {\r\n  fromLabel: 'Test Application 3',\r\n  recipients: 'recipient-3@mrn.org'\r\n  replyTo: 'reply-address@mrn.org',\r\n  subject: 'Test Subject 3',\r\n  templateLocals: // ...\r\n}])\r\n  .then(savedModels => {\r\n    savedModels.forEach(savedModel => console.log(savedModel));\r\n  })\r\n  .catch(error => console.error(error));\r\n```\r\n\r\n### Template\r\n\r\n```js\r\nconst getTemplate = require('coins-mail').getTemplate;\r\n\r\ngetTemplate({\r\n  html: {\r\n    myHtmlTemplateVar: '<h1>Hi!</h1> <p>Insert this html…</p>',\r\n  },\r\n  text: {\r\n    myTextTemplateVar: 'Alternative!\\n\\nFor the text version…',\r\n  },\r\n}, (error, result) => {\r\n  if (error) {\r\n    console.error(error);\r\n  } else {\r\n    console.log('HTML:', result.html);\r\n    console.log('Text:', result.text);\r\n  }\r\n});\r\n```\r\n\r\n`getTemplate` also returns a `Promise`:\r\n\r\n```js\r\ngetTemplate(myLocals)\r\n  .then(result => {\r\n    console.log('HTML:', result.html);\r\n    console.log('Text:', result.text);\r\n  })\r\n  .catch(error => console.error(error));\r\n```\r\n\r\n## License\r\n\r\nMIT. See [LICENSE](./LICENSE) for details.\r\n","maintainers":[{"name":"nidev","email":"nidev@mrn.org"},{"name":"swashcap","email":"swashcap@gmail.com"},{"name":"rsskmr","email":"rssktt+npm@gmail.com"},{"name":"jwtlake","email":"jwtlake@gmail.com"},{"name":"mstone121","email":"mstone121@gmail.com"},{"name":"ruwang","email":"rwang@mrn.org"},{"name":"cdaringe","email":"cdaringe@gmail.com"},{"name":"dlandis","email":"landis.d@gmail.com"},{"name":"smuttavarapu","email":"smuttavarapu@mrn.org"},{"name":"amrvignesh","email":"amrv1990@gmail.com"}],"time":{"modified":"2023-09-12T19:28:02.168Z","created":"2016-04-12T21:07:51.556Z","2.0.0":"2016-04-12T21:07:51.556Z","2.0.1":"2016-04-12T21:35:16.395Z","2.0.2":"2016-04-19T00:21:56.229Z","2.0.3":"2016-04-19T16:16:50.455Z","3.0.0":"2017-01-27T23:24:21.237Z","3.0.1":"2017-03-09T20:59:29.715Z","3.0.2":"2017-07-18T19:37:11.494Z","4.0.0":"2018-07-25T14:42:22.447Z","4.0.1":"2018-08-01T17:46:54.306Z","4.0.2":"2018-08-06T20:36:51.260Z","4.0.3":"2018-08-28T17:55:41.989Z","4.0.4":"2019-05-18T23:38:35.096Z","4.0.5":"2019-10-25T21:49:51.654Z","4.0.6":"2020-10-19T19:17:48.240Z","4.0.7-1":"2023-09-12T19:28:01.963Z"},"homepage":"https://github.com/MRN-Code/quarterback#readme","keywords":["coins","mail","email"],"repository":{"type":"git","url":"git+https://github.com/MRN-Code/quarterback.git"},"author":{"name":"Cory Reed","email":"creed@mrn.org"},"bugs":{"url":"https://github.com/MRN-Code/quarterback/issues"},"license":"MIT","readmeFilename":"README.md"}