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?
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 suitable for SMTP. But this might be just a matter of time, since ports getting blocked.
Solution:
Make an API option for onboaring-emails as well. (like mailgun API, that is already heavily promoted).
I would assume, that this would bring a so much more flexibility to open-source hosting.
Seconding this update to the docs when possible. I spent 1-2 days just to discover this as Digital Ocean has now blocked sending with SMTP. The workaround with port 2525 is working but not sure for how long. My suggestion is to please mention this somewhere in the docs that it could be caused by Digital Ocean’s blocking as I have 5 separate websites running on ghost hosted by digital ocean that I now need to reconfigure.
I’m also stuck in the Digitalocean smtp issue, but using this is giving me an “invalid Mail Transport” messge saying that the mail.transport key value of mailgun isnt valid. Any idea what the issue might be?
Setup works fine, but when you run ghost start or ghost doctor, the CLI flags the value mail.transport when set to "mailgun" as invalid. But, the workaround I’ve found is that when running ghost restart the unintended behaviour does not occurr.
Going to make an issue on GitHub, initially thought this was some error on my end, but it seems clear that this may be unintended behaviour.
I can confirm - I also need to ghost restart. This is probably a Ghost CLI issue, not main Ghost. (There’s a separate repo.) @acburdine may be interested, too! (Hi Austin!)
I have the same problem. I can send e-mails/newsletters fine via the API setup. But I am not able to get newsletter signups working. It wont send the e-mail.
How should the e-mail section in the .env file be so it is using the API instead? I am using the docker installation method.
Generically, the env variables for Ghost in docker look like mail__transport, mail__from, mail__options__auth__api_key, etc. Use double _ between nested values in the json.
[2025-08-14 13:20:15] INFO ActivityPub webhooks in correct state
[2025-08-14 13:20:15] INFO URL Service ready in 1267ms
[2025-08-14 13:20:25] INFO "GET /members/api/integrity-token/" 200 15ms
[2025-08-14 13:20:25] ERROR Failed to send email. Reason: Forbidden.
Failed to send email. Reason: Forbidden.
"Please see https://ghost.org/docs/config/#mail for instructions on configuring email."
Error ID:
70989c60-7911-11f0-a78b-4bb82bcc182a