【发布时间】:2023-04-03 02:10:01
【问题描述】:
我只是在我的服务器 nginx 上安装 sendmail。 我有项目nodejs。 所以,我使用 smtp 配置发送邮件。但是电子邮件仍然无法发送。
所以我使用了sendmail。但是有人知道如何设置 sendmail 的配置吗? 这是我之前的配置: '使用严格'
const Env = use('Env')
module.exports = {
/*
|--------------------------------------------------------------------------
| Connection
|--------------------------------------------------------------------------
|
| Connection to be used for sending emails. Each connection needs to
| define a driver too.
|
*/
connection: Env.get('MAIL_CONNECTION', 'smtp'),
/*
|--------------------------------------------------------------------------
| SMTP
|--------------------------------------------------------------------------
|
| Here we define configuration for sending emails via SMTP.
|
*/
smtp: {
driver: 'smtp',
pool: true,
port: 2525,
host: Env.get('MAIL_HOST'),
secure: false,
auth: {
user: Env.get('MAIL_USERNAME'),
pass: Env.get('MAIL_PASSWORD')
},
maxConnections: 5,
maxMessages: 100,
rateLimit: 10
}
}
【问题讨论】:
标签: javascript node.js nginx sendmail