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:
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?
"mail": {
"from": "no-reply@domain.xyz",
"transport": "mailgun",
"options": {
"auth": {
"api_key": "<api_key>",
"domain": "mg.domain.xyz"
},
"host": "api.eu.mailgun.net"
}
},
Related: