# Missing documentation for mail config options – Mailgun API support

**URL:** <https://forum.ghost.org/t/missing-documentation-for-mail-config-options-mailgun-api-support/56481>\
**Category:** Self-hosting\
**Created:** [March 31, 2025, 9:55am UTC](https://forum.ghost.org/t/missing-documentation-for-mail-config-options-mailgun-api-support/56481 "2025-03-31T09:55:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![quentin-binder](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/quentin-binder/32/35531_2.png) [@quentin-binder](https://forum.ghost.org/u/quentin-binder)\
**Post date:** [March 31, 2025, 9:55am UTC](https://forum.ghost.org/t/missing-documentation-for-mail-config-options-mailgun-api-support/56481/1 "2025-03-31T09:55:14Z")

</div>

I ran into some issues trying to set up transactional email with Ghost, and I think there’s a gap in the documentation that could use some clarification.

I wanted to use Mailgun for sending transactional emails and followed the instructions here:

> **[Configuration - Adapt your publication to suit your needs](https://ghost.org/docs/config/#mail)**
>
> Find out how to configure your Ghost publication or override Ghost's default behaviour with robust config options, including mail, storage, scheduling and more!

I tried configuring SMTP as described, but it consistently timed out after 60 seconds (without any errors). I double-checked the ports, authentication details, and tried multiple variations without success.

When I couldn’t get it working, I started looking for a full list of configuration options, but couldn’t find any comprehensive documentation— neither in the official docs nor in the forum. I also tried searching more broadly online but couldn’t find anything.

Eventually, I looked into the Ghost source code and found that it uses the @tryghost/nodemailer package (which appears to be not in the Mono Repo). In that package, I noticed there’s a “mailgun” transport option that allows sending transactional mail via the Mailgun API rather than SMTP.

I tried configuring Ghost to use the Mailgun API directly, and that finally worked.

So my questions are:

- Why isn’t this Mailgun API transport documented in the official Ghost docs? → Isn’t it more useful / reliable?

- Is there a complete list of supported mail configuration options anywhere?

- Or are we expected to look into the codebase to discover these things?

It would be really helpful if the docs included all valid config options, especially for something as important as mail.

Has anyone else run into this? Or found any reliable documentation on the mail config beyond what’s on the main site?

* * *

```JSON
  "mail": {
    "from": "no-reply@domain.xyz",
    "transport": "mailgun",
    "options": {
      "auth": {
        "api_key": "<api_key>",
        "domain": "mg.domain.xyz"
      },
      "host": "api.eu.mailgun.net"
    }
  },

```

* * *

Related:

> [@Make onboarding emails also work via API (not only SMTP)](https://forum.ghost.org/t/make-onboarding-emails-also-work-via-api-not-only-smtp/56426):
>
> The following problem: I had some issues setting up SMTP for Digital Ocean. And also other hosters, since there seems to be a tendency towards “we will not allow SMTP traffic” for a good reason. Please also refer to this thread: [Use Mailgun API, instead of SMTP for onboarding-emails?](https://forum.ghost.org/t/use-mailgun-api-instead-of-smtp-for-onboarding-emails/56417) The idea here is now: Why not make ghost available to use API-calls, like the one we have with mailgun, to get the onboarding emails gone right. Right now I can live with the “workarounds”, like using ports not s…

---

_[View the full topic](https://forum.ghost.org/t/missing-documentation-for-mail-config-options-mailgun-api-support/56481)._
