{"_id":"@abhishekdeb/ezmailer","_rev":"4-63b791931dfb5b282e2c9a40e3ee2313","name":"@abhishekdeb/ezmailer","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"@abhishekdeb/ezmailer","version":"0.0.1","description":"Out of the box Email wrapper for popular nodejs email systems","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikz91/ezmailer.git"},"keywords":["easy","email","system","email","wrapper","nodejs","email","system"],"author":{"name":"Abhishek Deb","url":"vikz91.deb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/vikz91/ezmailer/issues"},"homepage":"https://github.com/vikz91/ezmailer#readme","dependencies":{"email-templates":"^3.5.2","handlebars":"^4.0.11","mailgun-js":"^0.16.0","nodemailer":"^4.6.3","promise":"^8.0.1","sendgrid":"^5.2.3"},"devDependencies":{"eslint":"^4.19.0"},"directories":{"example":"example"},"gitHead":"bf76c0f0aea9867f0b57c58312028981169c5493","_id":"@abhishekdeb/ezmailer@0.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"abhishekdeb","email":"vikz91.deb@gmail.com"},"dist":{"integrity":"sha512-OYjnbDODgTjrugnKg8vCag302ZhK34vssDDJ/9QtAy28eozP89UIz5bvEcwEJyl87KRZUYiMrShyni/jS7x3KQ==","shasum":"6eac8068c9dddf4e66b54489a2c396e10f08f65d","tarball":"https://registry.npmjs.org/@abhishekdeb/ezmailer/-/ezmailer-0.0.1.tgz","fileCount":10,"unpackedSize":25720,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDsYQmzBRjFZDg8UA2RXdox8+BFjw8m+t2ONfhzdg1OgIgE+p1psq8r8Eqo1p6rHKil8Sk+Ov06E25gTkSidEoBfw="}]},"maintainers":[{"name":"abhishekdeb","email":"vikz91.deb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ezmailer_0.0.1_1521622912768_0.13286438267961076"},"_hasShrinkwrap":false},"0.0.2":{"name":"@abhishekdeb/ezmailer","version":"0.0.2","description":"Out of the box Email wrapper for popular nodejs email systems","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikz91/ezmailer.git"},"keywords":["easy","email","system","email","wrapper","nodejs","email","system"],"author":{"name":"Abhishek Deb","url":"vikz91.deb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/vikz91/ezmailer/issues"},"homepage":"https://github.com/vikz91/ezmailer#readme","dependencies":{"email-templates":"^3.5.2","handlebars":"^4.0.11","mailgun-js":"^0.16.0","nodemailer":"^4.6.3","promise":"^8.0.1","sendgrid":"^5.2.3"},"devDependencies":{"eslint":"^4.19.0"},"directories":{"example":"example"},"gitHead":"a31aac35bb8e992c18c9eca3f17734f46d5e2ce2","_id":"@abhishekdeb/ezmailer@0.0.2","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"abhishekdeb","email":"vikz91.deb@gmail.com"},"dist":{"integrity":"sha512-Wv3yjPpJUemQUFnqkByxzyCv8KBB1JbeDxfnsesoF4gwq14Apzt+KwNh0RNp0pQ9KulVi4KQUu9jdCOYdp2QEw==","shasum":"d693886a9e6eca09db6997383c6a28ad81ce1382","tarball":"https://registry.npmjs.org/@abhishekdeb/ezmailer/-/ezmailer-0.0.2.tgz","fileCount":10,"unpackedSize":25022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWffASHJR/YEpHV0fJiVCiMuqTpBghqRXGob4sF1LRNgIhAKf+FecW/tn4q+nDsw3Lgll5Zsal0EJ5DdVkV6BxpRQO"}]},"maintainers":[{"name":"abhishekdeb","email":"vikz91.deb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ezmailer_0.0.2_1521680727386_0.31175773018688324"},"_hasShrinkwrap":false},"0.1.1":{"name":"@abhishekdeb/ezmailer","version":"0.1.1","description":"Out of the box Email wrapper for popular nodejs email systems","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/vikz91/ezmailer.git"},"keywords":["easy","quick","email","system","email wrapper","nodejs","email system","ezmailer","abhishekdeb"],"author":{"name":"Abhishek Deb","url":"vikz91.deb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/vikz91/ezmailer/issues"},"homepage":"https://github.com/vikz91/ezmailer#readme","dependencies":{"@sendgrid/mail":"^6.3.1","email-templates":"^5.0.2","handlebars":"^4.0.2","mailgun-js":"^0.22.0","nodemailer":"^4.7.0","promise":"^8.0.1"},"devDependencies":{"eslint":"^4.19.0"},"directories":{"example":"example"},"gitHead":"109640ace96ce252a6259811e5835301b8b6966c","_id":"@abhishekdeb/ezmailer@0.1.1","_npmVersion":"6.5.0","_nodeVersion":"10.9.0","_npmUser":{"name":"abhishekdeb","email":"vikz91.deb@gmail.com"},"dist":{"integrity":"sha512-2KaMOg7VP5MIgWpi8/WQpKdP0aJOUzvMvsnRNNGjHKjfcTD0jltrNFKaxzyiNUb6tcCJjLh/hbS5016akju+9w==","shasum":"8472eaf50c4c7aaea660ac91930640f3f37c1d55","tarball":"https://registry.npmjs.org/@abhishekdeb/ezmailer/-/ezmailer-0.1.1.tgz","fileCount":11,"unpackedSize":26824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcH/isCRA9TVsSAnZWagAAHfgP/0BzUirsDIl294gkdkTR\nzxqCrF0jTUX2dd9ZKbP4tTJBrGpqhKSgMXV6kE0dhTVOYWXfOBLlsRmQMRnR\np4dAAJ19B1s1OXAOjCCFg1LbMR+Q8DbI4bzVpZT8unZTqCX37qTkSNMMRxPn\ng0dnHxDCNosdtCBvfyLilbov2C365atAI+NiCeJ6P9cw3+nuf9aaD4jXV6ze\num9NGBmx/PjDw4DIBjCLYglh7VNZwceaugSXg2QxKuwn4CUjL7hxBRhrW5Ol\nhh5FxZrbmgDVztg9WaX5uyls/nWNMMPj0a42/Yu0VBf3MJo7fDK1RtR/K/XY\n2FdTn4v66fwtHzWKj4ofr8UrWkVO35xYNsN8TJXJIT+U5xFQm/KKh+5jPSYK\nsI3B9Kcx3AcWKVyOWw0IqLoArcojsUh4sA9tDUqBAfFCc8PlD4pUEL6bWih9\ng73SzgHz7rTKrOYT2X/Yg9Er1hvtoLguqMi+A5XR/MIk6YukJiFbdyhD4RSB\n7FC30O5fZycBO23v9mqbAW5FV+yeXjIxeGyabEmHWPI9hXlLJDdxT/9Scad3\nbVg44t6gh0wd0QO+3Wwj9Fpf6RDr3ht1fyX5EU2ftxKb+IHN2xOWDuAW9RK8\nbW6MS4Q6zKi2UnYLuf2lnqasPVR8/9NhX1uS5Q+Ap1bqj64+tINIG1S214to\nzqmI\r\n=pR+U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAjWPbh3M01TsbpnkqXnS/V6UaTfje9CJ0HLQ2XiX1caAiEAqbvgGWQDnOiRspFtbcAtT7JwOvfeAcecb2zn5drJEJA="}]},"maintainers":[{"name":"abhishekdeb","email":"vikz91.deb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ezmailer_0.1.1_1545599147583_0.5253698771704955"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-21T09:01:52.718Z","0.0.1":"2018-03-21T09:01:53.004Z","modified":"2022-04-04T10:59:23.054Z","0.0.2":"2018-03-22T01:05:27.442Z","0.1.1":"2018-12-23T21:05:47.735Z"},"maintainers":[{"name":"abhishekdeb","email":"vikz91.deb@gmail.com"}],"description":"Out of the box Email wrapper for popular nodejs email systems","homepage":"https://github.com/vikz91/ezmailer#readme","keywords":["easy","quick","email","system","email wrapper","nodejs","email system","ezmailer","abhishekdeb"],"repository":{"type":"git","url":"git+https://github.com/vikz91/ezmailer.git"},"author":{"name":"Abhishek Deb","url":"vikz91.deb@gmail.com"},"bugs":{"url":"https://github.com/vikz91/ezmailer/issues"},"license":"MIT","readme":"# ezMailer v0.1.1\n\nOut of the box Email wrapper for popular nodejs email systems ( NodeMailer, Sendgrid, MailGun)\n\n[![NPM Version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Downloads Stats][npm-downloads]][npm-url]\n\n![](http://via.placeholder.com/500x150/42aaf4/fffffff?text=%3C+ezMailer+/%3E)\n\n*ez*Mailer is an out-of-the-box email system wrapper for node JS ecosystem.\nThe Main principle behind ezMailer is to abstract the nuances of maintaining an (or more) email system(s) from the developer.\n\nOh, and it has full blown templating support as well! Yay!\n\n## Requirements\n\n1. node >= 8\n2. npm >= 5\n\n## Features\n\n- Simple and ready to use, yet Powerful Email API\n- Nodemailer, email-templates, sendgrid, Mailgun integrated\n- Examples incuded\n- Config style setup\n- Promisified API\n- Used in generator-restgoose\n- Extensible\n- Much more to come ...\n\n## Installation\n\n**npm**: `npm i @abhishekdeb/ezmailer --save`\n\n**yarn**: `yarn add @abhishekdeb/ezmailer`\n\n## Setup\n\nezMailer has fairly minimalistic config, which stays same for any email system you work with.\n\n```javascript\n// config.mail.js\n'use strict';\n\nmodule.exports = {\n  templatePath: './',\n  services: {\n    nodemailer: {\n      provider: 'Gmail', //yahoo, etc.\n      user: '[Username]@gmail.com',\n      pass: '[Your_Password]'\n    },\n\n    sendgrid: '[Your_SendGrid_Key]',\n\n    mailgun: {\n      apiKey: '[Your_Mailgun_key]',\n      domain: '[Your_website_domain]'\n    }\n  }\n};\n```\n\nYou will feed this config to initialization of ezmailer on startup.\n\n```javascript\n// app.js (or any entry point of the app)\nlet config = require('./config.mail.js'); // the above configuration\n\n//Load ezmailer with the config's email section that corresponds to ezmailer\nlet ezmailer = require('ezmailer');\nezmailer.use(config, 'nodemailer'); //nodemailer / sendgrid / mailgun\n```\n\n## Usage example\n\nezMailer needs a config file which will contain your smtp credentials for NodeMailer, sendgrid, etc...  \nPlease use a config file like above.\n\n1. Create a Config File:\n\n```javascript\n// config.mail.js\n'use strict';\n\nmodule.exports = {\n  templatePath: './',\n\n  mailer: {\n    service: 'Gmail',\n    user: 'sample.user@gmail.com',\n    pass: 'sample.password'\n  }\n};\n```\n\n2. Require this config and pass it to ezmailer with default service\n\n```javascript\n//app.js\n'use strict';\n\nlet ezmailer = require('ezmailer');\nezmailer.use(require('./config.mail'), 'nodemailer');\n```\n\n3. Load up email options and sendMail\n\n```javascript\n//service.sample.js\n\nlet mailOptions = {\n  from: 'from@gmail.com',\n  to: 'to@gmail.com',\n  subject: 'Sample Basic ezmailer test',\n  body: {\n    text: 'This is basic ezmailer test. ',\n    html: '<h1>This is <u>Basic</u> <b><i>ez</i>Mailer<b> test.'\n  }\n};\n\n//Send the mail. sendMail returns a promise.\nezmailer.sendMail(mailOptions).then(\n  data => {\n    console.log('Email has been sent : ', data);\n  },\n  err => {\n    console.log('Email could not be sent : ', err);\n  }\n);\n```\n\n_For more examples and usage, please refer to the (Wiki)[wiki]._\n\n## Release History\n\n- 0.1.1\n  - Major Revamp of architecture\n  - Upgraded all packages\n  - Faster, Stronger, Sharper\n- 0.0.2\n  - Small Bug FIxes\n- 0.0.1\n  - Initial Release\n  - Templating System Integrated\n\n## Extension\n\nThe source is pretty simple. The main **index.js** file is responsible for service discovery and selection. The Services are defined in '_services_' directory. If you need to add a new email provider like nodemailer or sendgrid, create a new folder inside _services_ and it will be automatically registered.  \nTo get started with extensions, copy paste an existing service and edit through it.  \n**NOTES**\n\n1. _extension Directory name and ezmailer.use(config, &lt;name&gt;) should be identical._\n2. _All new extensions must support the generic config file_\n\n**Usage**\n\n1. Create new entry in your email config.\n2. Copy Paste & Edit / Create new folder inside**services** directory : `Services/customProvider`\n3. Edit/ Write `index.js` to first read the config file and then eventually send same reply.\n4. Write test cases for the extension in _spec.js_ inside the same extension directory.\n5. Get reviewed by peer.\n\n## Meta\n\nAbhishek Deb – [@vikz91](https://twitter.com/vikz91) – vikz91.deb@gmail.com\n\nDistributed under the MIT license. See `LICENSE` for more information.\n\n[https://github.com/vikz91](https://github.com/vikz91/)\n\n## Contributors\n\n1. [VikZ91](https://github.com/vikz91) - Base System\n2. [EranGoldman](https://github.com/EranGoldman) - Adding Mailgun\n\n## Contributing\n\n1. Fork it (<https://github.com/yourname/yourproject/fork>)\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n## Bucket List\n\n0. ~Seperate Config File System~\n1. ~Update ReadMe~\n1. ~Seperate Npm Package (from generator-restgoose)~\n1. SoC Refactoring <- going on\n1. Extensive Testing\n1. Write Test Cases using Karma\n1. Write Functions to add custom email transport\n1. Add to Travis / Circle\n1. Adding Attachments\n1. Subject Template\n1. Attachments\n1. CC, BCC\n1. Receive EMAIL Notification Hook\n1. Adding Support for MailChimp\n\n<!-- Markdown link & img dfn's -->\n\n[npm-image]: https://img.shields.io/npm/v/datadog-metrics.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/datadog-metrics\n[npm-downloads]: https://img.shields.io/npm/dm/datadog-metrics.svg?style=flat-square\n[travis-image]: https://img.shields.io/travis/vikz91/node-datadog-metrics/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/vikz91/node-datadog-metrics\n[wiki]: https://github.com/vikz91/ezmailer/wiki\n","readmeFilename":"README.md"}