Make onboarding emails also work via API (not only SMTP)

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?

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.

Ghost should support using Mailgun via API for transactional email. Can you try the configuration from this portion of the docs?

Vikas, the docs don’t show an example with Mailgun API, only SMTP. Might be a docs problem, though!

heh my bad, I saw the section and walked read right past it :upside_down_face:

Reading the wrapper code and nodemailer-mailgun-transport docs, I think something like this might work:

"mail": {
    "transport": "mailgun",
    "options": {
        "host": "<>",
        "auth": {
            "api_key": "<>",
            "domain": "<>"
        }
    }
}
2 Likes

Amazing!

It absolutely works! Would be great, to have this mentioned in the docs. But at least we have now this searchable in the forums.

Thanks again!

2 Likes