fpm-server的邮件推送插件
- Use nunjucks template
$ npm i fpm-plugin-emailer --save
{
...
email: {
"service": "qq",
"user": "88888888@qq.com",
"pass": "88888888"
}
...
}
fpm.emailer.send(options, callback)
var email = {
to: 'xxxx@xx.com',
subject: 'this is a title',
template: 'hellow {{ name }}', //use nunjucks template enginer
data: {name: 'jack'}
};
fpm.emailer.send(email, function(err, res){
//code the callback here
})