# Mailgun not working when on Digital Ocean (Ghost running with docker-compose). 504 in web ui, but 200 in docker logs

**URL:** <https://forum.ghost.org/t/mailgun-not-working-when-on-digital-ocean-ghost-running-with-docker-compose-504-in-web-ui-but-200-in-docker-logs/40386>\
**Category:** Self-hosting\
**Created:** [August 9, 2023, 11:49pm UTC](https://forum.ghost.org/t/mailgun-not-working-when-on-digital-ocean-ghost-running-with-docker-compose-504-in-web-ui-but-200-in-docker-logs/40386 "2023-08-09T23:49:00Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [August 10, 2023, 3:25pm UTC](https://forum.ghost.org/t/mailgun-not-working-when-on-digital-ocean-ghost-running-with-docker-compose-504-in-web-ui-but-200-in-docker-logs/40386/9 "2023-08-10T15:25:41Z")

</div>

The Mailgun API doesn’t use SMTP, it uses HTTPS. That’s confusing because transactional emails _do_ to mailgun via SMTP.

It’s not clear why Ghost doesn’t use the API for everything.

Scroll down here to find some example calls to Mailgun. Try sending a basic message through your server directly to Mailgun.

If that works, try again, but inside your Ghost container

[https://documentation.mailgun.com/en/latest/api-sending.html#examples](https://documentation.mailgun.com/en/latest/api-sending.html#examples)

I realize containers help with isolation and use them in production myself, but for my personal Ghost installs, I use the official instructions that forego containers. It eliminates the whole layer of bugs that could possible exist in the container configuration layer.

---

_[View the full topic](https://forum.ghost.org/t/mailgun-not-working-when-on-digital-ocean-ghost-running-with-docker-compose-504-in-web-ui-but-200-in-docker-logs/40386)._
