new Sendmail(configopt)
- Source:
构造器
config.nodemailer
:从外部指定nodemailer
,若未指定则使用内置nodemailer
。
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
config |
Object |
<optional> |
{}
|
插件配置 |
Methods
send(mail, templateopt, dataopt) → {Promise}
- Source:
- See:
发送邮件
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
mail |
Object | 参数, |
||
template |
Object |
<optional> |
{}
|
|
data |
Any |
<optional> |
数据 |
Returns:
结果
- Type
- Promise
template(message, data) → {Object}
- Source:
- See:
处理模板
Parameters:
Name | Type | Description |
---|---|---|
message |
Object | 消息, 其中:
|
data |
Any | 数据 |
Returns:
内容
- Type
- Object