1.0.2 • Published 2 years ago

egg-dynamic-email v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

egg-dynamic-email

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-dynamic-email --save

Usage

// {app_root}/config/plugin.js
exports.eggDynamicEmail = {
  enable: true,
  package: 'egg-dynamic-email',
};

Configuration

// {app_root}/config/config.default.js
exports.eggDynamicEmail = {
  user: '',
  password: '',
  host: '',
  sender: '',
};

see config/config.default.js for more detail.

Example

// {app_root}/app/controller/home.js
 async index() {
   const { ctx } = this
   const res = await ctx.app.email.sendEmail('title','content','receiver', [{data: 'html content', alternative: true}])
 }

Questions & Suggestions

Please open an issue here.

License

MIT