本文介绍了SSL23_GET_SERVER_HELLO:未知协议[连接到msa(587)端口]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to send email when a new user registrates or forgot his password.I am working on a linux and the app was developed with 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: '[email protected]',
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: "[email protected]",
    pass: ""
  }

我不知道为什么会收到这个错误。

I don't know why I get that error.

推荐答案

如果连接到msa(587)或smtp(25)端口,那么不要设置 secureConnection to true

If you connect to msa (587) or smtp (25) port then DO NOT set secureConnection to true.

您的代码与 secureConnection 设置为true尝试启动SSL协商一次,但另一方给您未加密 SMTP问候。

Your code with secureConnection set to true tries to start SSL negotiation at once but the other side gives you unencrypted SMTP greeting.

这篇关于SSL23_GET_SERVER_HELLO:未知协议[连接到msa(587)端口]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 01:49