egg-aws-email
v1.0.3
Published
egg aws email
Downloads
4
Maintainers
Readme
Install
npm install --save egg-aws-email
Usage
// {app_root}/config/plugin.js
exports.email = {
enable: true,
package: 'egg-aws-email',
};
Configuration
// {app_root}/config/config.default.js
exports.email = {
client:{
"accessKeyId": "your accessKeyId",
"secretAccessKey": "your secretAccessKey",
"region": "us-east-1"
}
};
Example
// {app_root}/app/controller/home.js
const Controller = require('egg').Controller;
module.exports = class HomeController extends Controller{
async index(){
this.ctx.app.email.sendMail({
from: '[email protected]',
to: '[email protected]',
subject: 'Message',
text: 'I hope this message gets sent!' // can use html:'html content'
})
}
}
Questions & Suggestions
Please open an issue here.