最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin0浏览0评论

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:

[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::

Configuration:

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

I don't know why I get that error.

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:

[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::

Configuration:

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

I don't know why I get that error.

Share Improve this question edited Jun 12, 2017 at 7:39 AnFi 10.9k3 gold badges27 silver badges52 bronze badges asked Mar 17, 2014 at 18:49 user3430250user3430250 431 silver badge4 bronze badges 2
  • Are you sure that that is a proper configuration? You don't need a password for the mail server in order to send or connect? Have you redacted it or do you not use one? – zero298 Commented Mar 17, 2014 at 19:13
  • I tried with a valid user and valid password as well but get same error.SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol: – user3430250 Commented Mar 17, 2014 at 19:34
Add a ment  | 

1 Answer 1

Reset to default 9

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

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

https://nodemailer./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

发布评论

评论列表(0)

  1. 暂无评论