gpt4 book ai didi

javascript - SSL23_GET_SERVER_HELLO :unknown protocol [connection to msa (587) port]

转载 作者:搜寻专家 更新时间:2023-10-31 23:30:53 25 4
gpt4 key购买 nike

我正在尝试在新用户注册或忘记密码时发送电子邮件。我在 linux 上工作,应用程序是用 node.js 开发的。

错误:

[Error: 140020013401920:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:

014-03-17T04:23:22-0700 app.0: debug: cleared heartbeat timeout for client VP5heQmQKpirWe81qegF
2014-03-17T04:23:22-0700 app.0: debug: set heartbeat interval for client VP5heQmQKpirWe81qegF
2014-03-17T04:23:28-0700 app.0: { name: 'anyUser',
2014-03-17T04:23:28-0700 app.0: { [Error: 140020013401920:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:683:
2014-03-17T04:23:28-0700 app.0: hash: null,
2014-03-17T04:23:28-0700 app.0: ] stage: 'init' }
2014-03-17T04:23:28-0700 app.0: email: 'testmail@testmail.com',
2014-03-17T04:23:28-0700 app.0: initial: null,
2014-03-17T04:23:28-0700 app.0: _id: 5326d4262a8c57cf04000005,
2014-03-17T04:23:28-0700 app.0: __v: 0,
2014-03-17T04:23:28-0700 app.0: pending: false,
2014-03-17T04:23:28-0700 app.0: playerBadges: [],
2014-03-17T04:23:28-0700 app.0: appRole: 'Player',
2014-03-17T04:23:28-0700 app.0: projectsPlayer:
2014-03-17T04:23:28-0700 app.0: [ { project: 5326d366c004dd9305000005,
2014-03-17T04:23:28-0700 app.0: _id: 5326d4262a8c57cf04000006,
2014-03-17T04:23:28-0700 app.0: role: 'Team Member' } ] }
2014-03-17T04:23:28-0700 app.0: PUT /login/resetpassword 200 4ms - 58
2014-03-17T04:23:28-0700 app.0: notify client side that there are a error send email
2014-03-17T04:23:47-0700 app.0: debug: emitting heartbeat for client VP5heQmQKpirWe81qegF
2014-03-17T04:23:47-0700 app.0: debug: websocket writing 2::

配置:

var smtp = {
host: "server.stestmail.local",
secureConnection: true,
port: 587,
requiresAuth: false,
domains: ["stestmail.com"],
auth: {
user: "anyuser@stestmail.com",
pass: ""
}

我不知道为什么会出现该错误。

最佳答案

如果您连接到 msa (587) 或 smtp (25) 端口,则不要secureConnection 设置为true

您将 secureConnection 设置为 true 的代码尝试立即开始 SSL 协商,但另一方给您未加密 SMTP 问候语。

https://nodemailer.com/smtp/

secureConnection - use SSL (default is false, not needed with service). If you're using port 587 then keep secureConnection false, since the connection is started in insecure plain text mode and only later upgraded with STARTTLS

关于javascript - SSL23_GET_SERVER_HELLO :unknown protocol [connection to msa (587) port],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22462819/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com