Use Mailgun API, instead of SMTP for onboarding-emails?

I have the following problem:

I tried to setup Ghost - event on the “official partner” Digital Ocean with the official Digital Ocean Droplet.

BUT: Digital Ocean forbids the use of SMTP. I also talked to the support, and they will not allow sending of SMTP.

In the meantime I also tried another hoster - but they have the same issue.

I was wondering, if it would be possible, to also use Mailgun API for sending the onboarding mail.

Because without being able to send out the onboarding-email - the complete application get useless. And self-hosting is not possible anymore, unless you find one rare hoster, that allows SMTP delivery.

PS:
I also found a LOT of topics here on the forums, where people have problems sending via SMTP. Most of this topics end with “I don’t know what the problem is”. Also I needed to some hours of messing around - to in the send write an email to the Digital Ocean support, so I got the info, that SMTP is forbidden at their cloud-servers. Also opening ports on the firewall makes no difference, since they totally forbid SMTP-traffic.

I’ve seen of a number of Ghost sites running in droplets who appear to have SMTP working. DO told you that SMTP was totally forbidden? That’s new, if so. And they have ports 465 and 587 blocked too? A lot of hosts have ports blocked by default but will unblock when asked.

Just to add: I’ve got Ghost running in a VPS at Hostinger. The price is competitive with DO (or better than), but the commitment is longer.

Here is a copy of the message I gut from Digital Ocean support:

We understand you have concerns regarding SMTP restrictions in place on your account. DigitalOcean is not a dedicated email host and stopping spam is a constant fight. Due to this, restrictions have been imposed on all accounts.

We would also like to provide some additional background on this issue. Since IP addresses in cloud environments get used and released back to available pools very frequently, they are considered dynamic and untrustworthy. For example, you’re currently assigned an IP address and you’re a responsible mail user. You follow all best practices for mail and never send spam or unsolicited mail. Later, when you no longer need that Droplet, you destroy it and the IP address is free to be assigned to another DigitalOcean user. That user takes the opportunity to send out a large volume of spam before our Security team takes action on the offending account.

Mail providers like Gmail, Microsoft, and others cannot determine if email coming from an IP is legitimate or not until it gains a poor reputation. By that time, the damage had already been done. It’s safer to just block all mail coming from platforms, like Internet Service Providers and Cloud hosting environments, where IP addresses are dynamically assigned and inherently risky.

While this does reduce avenues that spammers have available to them, it also impacts legitimate users. Our Abuse Operations team is working with SBLs to get the IPs delisted. Due to this, we are restricting SMTP traffic across the DigitalOcean platform. This means that we are unable to remove the SMTP restriction that is placed on your account.

We understand that your workflow may have email needs. As a solution to this restriction, we have partnered with SendGrid to offer all our customers a better solution where you would not need to worry about IP reputation and blacklisting. You can read more about this in our article here. Through SendGrid, you will be able to send 100 free emails per day and if your requirement is beyond the free tier, feel free to reach out to SendGrid support to opt for a better plan to meet your requirement.

We’re always happy to help if you have additional questions, so please don’t hesitate to reach out.

And the link to the support article. Date is March 2025, so this might be something new eventually…

1 Like

Thanks for the update. That’s new since I did anything there last.

You might see if DO has 2525 also blocked…
Sending Messages.

Or Fastmail has an anyport proxy setup: IMAP, POP, and SMTP – Fastmail

Oh thanks. That workaround with port 2525 worked!

Also thanks for the fastmail-suggestion.

But I still would like to see an option to also send onboarding-mails via API-call. Because who knows, that if one day DO would also shut down port 2525?

Fastmail firewall / proxy is also a nice idea, but add again additional costs for just sending this simple emails. Having the “send via API” option, that would be save in any case and every setup. This would be a great feature to have!!

Feel free to drop the idea over in the Ideas forum.

Just use Ghost(Pro) and that removes this “problem”, there is a reason they are priced where they are priced. Trying to cheap out is what actually causes issues.

Well sure, but I have some specific use-case, where self-hosting is needed. But thanks for the advice.

1 Like

And here it is!

Thanks for all the support so far!