IT & Engineering

Ghost and Mailgun integration made easier

Meet Ghost Ghost is a project conceptualized by John O’Nolan and Hannah Wolfe to reboot the experience behind writing content on the web. It is a blogging platform focused on making writing pleasurable



Meet Ghost

Ghost is a project conceptualized by John O’Nolan and Hannah Wolfe to reboot the experience behind writing content on the web. It is a blogging platform focused on making writing pleasurable and publishing simple. It’s also an open source platform. Ghost was started through a successful kickstarter campaign, smashing through their original goal of £20,000 to raise almost £200,000.

Ghost was created with the vision that if people find a project useful, they will help by contributing to its development. Today Ghost has become a self-sustained open source software community effort. The platform is written and maintained by a large community of open source enthusiasts. Ghost is completely written with one of the web’s favorite languages: Javascript!

Mailgun as Ghost’s preferred email service

We are also a big proponent of open source software. Mailgun would not be here without OSS and we try to return the favor by open sourcing our tools and utilities to the community. The two most starred projects by the community on the Mailgun GitHub repo are Flanker, a parsing library for email addresses and MIME messages, and Vulcand a reverse HTTP proxy library written in Golang. We’ll be moving more and more of our code into the public domain in the future.

We knew about Ghost’s Kickstarter campaign but we started to take further notice when we started seeing significant referrals from Ghost’s documentation. Needless to say, when we discovered that Mailgun was the preferred email service provider for Ghost, we were a pleasantly surprised. It is a great feeling to know that our service was featured as the chosen email router. Even better, this didn’t come out of some marketing or biz dev campaign, just that they liked the product. Self-service APIs FTW!

Naturally, we want to support Ghost in any way we can. We recently put some effort into using Mailgun with Ghost even easier.

First, we improved the Ghost documentation for using Mailgun. Since Ghost is open-sourced it was as easy as submitting a pull request. We cleaned up some small issues and made it more clear how to add Mailgun credentials to the Ghost config file.

Then, we thought about how we could take this a step further and automate the process.

Introducing mailghost

Mailghost is a simple app that takes your Mailgun API key and allows you to download a config file with your Mailgun credentials pre-populated.

The process is pretty straightforward:

  1. Sign up for Mailgun and retrieve your API key.

Sign Up

It's easy to get started. And it's free.

See what you can accomplish with the world’s best email delivery platform.

2. Go to the Mailghost page to generate your config.js file with your Mailgun credentials included.

3. Replace the downloaded config file in your root folder where Ghost is installed (ghost/in our scenario case) and you’re ready to send emails!

Mailghost is built using expressjs 4.0, the Mailgun API through the request module and the Jadetemplating language. If you would like to read about how to build an API web-app using node.js make sure to tweet or leave a comment with your thoughts!

More Mailgun and Ghost in the future

As Ghost is continuously improving over time, with a planned public API release set for September 2014, you can expect more Mailgun goodness coming out of our labs. If you have a cool idea for Ghost that involves email, make sure to let us know.

Finally, Mailgun has been on a long and bumpy journey with blogging platforms. We started with Tumblr, mostly because it was quick and easy. However, it is proprietary and lacks a lot of features necessary to run a blog amongst a team of people. Then we moved to WordPress, which has all the features and plugins you could want but is a bit clunky and the publishing experience is not great. We’re hoping the third time is a charm with our recent switch to Ghost. Writing blog posts are now actually enjoyable. We definitely recommend checking it out.

Happy Sending!

Related readings

An expanded Mailgun product suite to transform email deliverability

Today marks a special day for Sinch Mailgun. For over a decade, our focus has been to provide the best email experience for businesses all around the world. Now, we take...

Read more

Privacy, automatic engagements, and Mailgun’s bot detection

Now more than ever, users are concerned about their data privacy and what steps they can take to protect their personal information. And that’s something big players in the tech...

Read more

How does Mailgun keep your emails protected?

On the surface, email seems relatively harmless – but dig a bit deeper and you’ll discover there’s a treasure trove of personally identifiable information (PII) at risk. This risk...

Read more

Popular posts

Email inbox.

Build Laravel 10 email authentication with Mailgun and Digital Ocean

When it was first released, Laravel version 5.7 added a new capability to verify user’s emails. If you’ve ever run php artisan make:auth within a Laravel app you’ll know the...

Read more

Mailgun statistics.

Sending email using the Mailgun PHP API

It’s been a while since the Mailgun PHP SDK came around, and we’ve seen lots of changes: new functionalities, new integrations built on top, new API endpoints…yet the core of PHP...

Read more

Statistics on deliverability.

Here’s everything you need to know about DNS blocklists

The word “blocklist” can almost seem like something out of a movie – a little dramatic, silly, and a little unreal. Unfortunately, in the real world, blocklists are definitely something you...

Read more

See what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon