Ghost unable to send emails


I developed my own Ghost theme and am now trying to switch to Ghost 3.0 features. Specifically the members option. When trying to set up the email auth (Mailgun) I changed my production.config.json accordingly in Digital Ocean server console - I’m almost 100% sure I got it right. However, Ghost is still unable to send emails. I get this error:

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

Any help would be awesome. Thanks!


Hello Martin,

This error is linked with your SSL configuration.

You can find here an end-to-end how to configure Mailgun with Ghost if that can help you:

If not resolved then please share your “mail” section in config.production.json file.


thanks for answering. I followed the tutorial you recommended. For some reason the status of the DNS records at Mailgun is still as if they’re not set. What’s the deal with the SSL?

Here’s my mail section of the config.production.json:

Appreciate your help,

Hello Martin,

Thank you for your reply.

I will check your config but first please modify your screenshot and mask/remove your pass (and for security reason please change your passphrase in your mailgun account as soon as possible).

1 Like

Hello Martin,

Just checked your configuration and seems find the problem.

You have added this line:

"secureConnection": true,

But it’s not needed (only needed if you use a non secured SMTP port like default 25/tcp but in your case you used 587/tcp, submission port is already secured) then remove it and try a configuration like below:

  "mail": {
    "from": "'Martin Verbic' <>",
    "transport": "SMTP",
    "options": {
      "host": "",
      "port": 587,
      "auth": {
        "user": "",
        "pass": "<add your new passphrase here>"

Keep me inform if your issue is fixed now.
If fixed then check “Solution” for this post that’s help others users with same issue.

1 Like

Great, thank you for both pieces of advice…works like a charm.


1 Like