# Ghost won't send registration e-mails via Mailgun

**URL:** <https://forum.ghost.org/t/ghost-wont-send-registration-e-mails-via-mailgun/25976>\
**Category:** Developer help\
**Created:** [September 29, 2021, 7:49pm UTC](https://forum.ghost.org/t/ghost-wont-send-registration-e-mails-via-mailgun/25976 "2021-09-29T19:49:48Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![twelvetables](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/twelvetables/32/15344_2.png) [@twelvetables](https://forum.ghost.org/u/twelvetables)\
**Post date:** [October 1, 2021, 11:04am UTC](https://forum.ghost.org/t/ghost-wont-send-registration-e-mails-via-mailgun/25976/9 "2021-10-01T11:04:56Z")

</div>

Hi Halpdesk,

As EmpiricalEE noted, Docker doesn’t use a config file for Ghost, it uses environment variables (that you can define in a .env file).

Ghost explains how to use environment variables for your config [here](https://ghost.org/docs/config/#running-ghost-with-config-env-variables). TL;DR, instead of nesting items in JSON, you separate them with double underscores.

Dave Jansen has a [great blog post](https://davejansen.com/ghost-matomo-mariadb-and-traefik-with-ssl-stack/) on how to properly deploy Ghost. I made some minor modifications but by-and-large used his setup. It works great.

So:

```auto
  "mail": {  
  "options": {  
    "host": "smtp.mailgun.org",  
   }
}

```

would become:

```auto
mail __options__ host: 'smtp.mailgun.org'

```

You can see my docker config at:

> [@Mailgun SSLv3 error in Docker after updating SSL certificate](https://forum.ghost.org/t/mailgun-sslv3-error-in-docker-after-updating-ssl-certificate/26007):
>
> I have had a blog running for about 3 months, with bulk and transactional email working just fine. I updated my SSL certificate, and now my bulk email is failing with an SSLv3 error (see full error message below). Everything I read online suggests that I need to use SMTP port 587 without secureConnection set to true, which is what I am currently doing. The only change that was made before I experienced this error was updating my SSL certificate; immediately after that my transactional mail star…

(I have removed the Matomo portion of that config, but I can share with you over DM if you would like).

Getting Ghost set up with Docker is a bit of a hassle the first time (only because you have to learn Docker), but if you make sure you use volumes, it is a breeze to maintain!! Upgrading Ghost isn’t done through the command line, but is done instead through a simple: `docker-compose restart` or a `docker-compose down && docker-compose up -d`.

Let me know if you have any additional questions!

---

_[View the full topic](https://forum.ghost.org/t/ghost-wont-send-registration-e-mails-via-mailgun/25976)._
