Fixing issues with Ghost-Mailgun in transactional mails

What to do when your transactional emails are not working on your Ghost blog self hosted instance via docker containers? I will show you what troubleshooting you can do πŸš€

Fixing issues with Ghost-Mailgun in transactional mails
Photo by NEOM / Unsplash

TL;DR

If you are a self hosted ghost blog owner that uses docker, maybe you should sometimes to fix any issues with your Mailgun settings, I will show you which steps I follow to fix those issues.

πŸ“§ Check your config.production.json

As a self hosted Ghost blog owner, you should be aware this is the main file to setting up your transactional emails in your Ghost instance, you could check if this file is in good shape with the command:

docker exec -it <container-name> cat config.production.js

I previously show you hot to set up your docker-compose to always rebuild this file with the correct information in each container restart here:

Setting up your Mailgun in your selfhosted Ghost
If you’re hosting your own Ghost blog in a docker container you should to know how to setting up your mail settings with Mailgun, if not I will show you how πŸ‘

But what to do when any issue arise?

πŸ“ƒ Check your Ghost logs

You should to check your containers logs with the command:

docker container logs <container-name> --since 10m

The parameter since show logs since timestamp (e.g. "2013-01-02T13:23:37Z") or relative (e.g. "42m" for 42 minutes).

There is useful information to check which could be the issue.

πŸ‘€ Double check Ghost docs

Double check official docs about Ghost email settings, maybe you missed something important there.

As important reminder you should to set up first your transactional emails before your bulk emails.

πŸš€ Restart after each change

As rule don't forget to restart your Ghost instance after any change, in a regular self hosted instance it could be achived by running the command ghost restart but as a docker user you could do it by restarting your container with docker container restart <container-name>