egg-messager
Messager for egg frame work
Installation
$ npm install --save egg-messager
Usage
var messager = ; // 发送邮件var config = host: processenvNN_MAIL_SERVER || 'smtp.126.com' port: processenvNN_MAIL_PORT || 465 secure: 'true' password: processenvNN_MAIL_PASSWORD email: processenvNN_MAIL_EMAIL;var options = type: 'email' // 指定类型,如果是短信。 type是sms toUser: 'calidion@gmail.com' // 接收人如果是sms则为手机号 title: 'title' // 如果是短信可以不用填 options: // 如果是短信不用填 captcha: 'eeodo' path: path // 模板所在的目录 template: 'email.html' // 模板名;;
License
© calidion