Local Ghost 3.0 - subscribing does not work

I found a different issue that relates to this. Symptom was the same (“Please enter a valid email address”) but only occurred after I’d configured Mailgun in my production configuration.

Looking at the log (content/logs/https___blog_example_org_uk__production.log) I spotted this error:

{“name”:“Log”,“hostname”:“ghost-server”,“pid”:14032,“level”:50,“err”:{“id”:“redacted”,“domain”:“https://blog.example.org.uk/",“code”:null,“name”:“EmailError”,“statusCode”:500,“level”:“normal”,“message”:"Failed to send email. Reason: 139821288294208:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.”,“help”:“"Please see Configuration - Adapt your publication to suit your needs for instructions on configuring email."”,“stack”:“EmailError: Failed to send email. Reason: 139821288294208:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.\n at EmailError.GhostError (/var/www/versions/3.13.4/core/server/lib/common/errors.js:10:26)\n at new EmailError (/var/www/versions/3.13.4/core/server/lib/common/errors.js:34:20)\n at createMailError (/var/www/versions/3.13.4/core/server/services/mail/GhostMailer.js:50:12)\n at MailComposer.transport.sendMail [as returnCallback] (/var/www/versions/3.13.4/core/server/services/mail/GhostMailer.js:92:28)\n at SMTPConnectionPool._onConnectionError (/var/www/versions/3.13.4/node_modules/simplesmtp/lib/pool.js:334:17)\n at SMTPClient.emit (events.js:198:13)\n at SMTPClient.EventEmitter.emit (domain.js:448:20)\n at SMTPClient._onError (/var/www/versions/3.13.4/node_modules/simplesmtp/lib/client.js:373:10)\n at TLSSocket.emit (events.js:198:13)\n at TLSSocket.EventEmitter.emit (domain.js:448:20)\n at emitErrorNT (internal/streams/destroy.js:91:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)\n at process._tickCallback (internal/process/next_tick.js:63:19)\n\nError: 139821288294208:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n”},“msg”:“Failed to send email. Reason: 139821288294208:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.”,“time”:“2020-04-23T19:16:49.252Z”,“v”:0}

A workaround seems to be to disable the secure email element of using Mailgun:

  "mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.eu.mailgun.org",
      "port": 587,
      "secureConnection": false,
      "auth": {
        "user": "redacted",
        "pass": "redacted"
      }
    }
  },

(Previously secureConnection was set to true.)

This isn’t optimal, and I’d rather use a secure connection. Is this a problem with Ghost or do I need to do a Node update of some description?

Current versions

  • Ghost-CLI version: 1.13.1
  • Ghost version: 3.13.4
  • Node version: 10.16.0
  • Npm version: 6.9.0

Any help gratefully received!

2 Likes