Ghost unable to send emails

They’re the credentials for whatever is specified in "host". Eg. Mailgun or Mandrill.

1 Like

The error message is:

Failed to send email. Reason: 140371041437568:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332: 

We’ve had something similar after the latest upgrade; while mailgun appears to be working, “local” mails to staff were failing; this was traced to Ghost rejecting the self-signed certificate of the local postfix installation (aka doing something against the norm - self-signed certificates are normal on local/internal postfix/other SMTP services), and further traced to a nodemailer setting. Adding

"tls": {
        "rejectUnauthorized": false
      },

resolved the issue for us.

I’d be surprised if it’s a localhost issue given the "transport" and "host" settings, but I’m really very new to Ghost so have a lot to learn and might need to tap out at this point! The only other clue I can see is that “port” is given as a string and as far as I know it should be a number. That is, "port": 587,, not "port": "587",.

Simple and great solution! I removed the port reference and configured simple. Worked!

1 Like

This recent issue does seem quite serious with regards to the old secureConnection being changed to secure within config.production.json, and it oddly and silently broke my Ghost site.

Probably good to notify everyone especially those who use Mailgun as an option to change the option within their config.production.json, as well as to upgrade to the latest Ghost version which is 4.18.0.

I actually went to change my entire Mailgun settings and it didn’t change the result. I must give thanks for you guys having a more recent discussion about this. Thanks! ;)

I faced the same problem. It turned out that the old secureConnection was changed to secure. To those running Ghost on GKE with Mailgun, you only need to set these:

  --set app.container.env.mail_options_port="2525"
  --set app.container.env.mail_options_secure="false"

I assume here you have these in your deployment settings for Ghost container

    - name: mail__options__port
      value: {{ .Values.app.container.env.mail_options_port | quote }}
    - name: mail__options__secure
     value: {{ .Values.app.container.env.mail_options_secure | quote }}