$ npm i egg-dynamic-email --save
// {app_root}/config/plugin.js
exports.eggDynamicEmail = {
enable: true,
package: 'egg-dynamic-email',
};
// {app_root}/config/config.default.js
exports.eggDynamicEmail = {
user: '',
password: '',
host: '',
sender: '',
};
see config/config.default.js for more detail.
// {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}])
}
Please open an issue here.