Email automation goodness with Postmark & Ghost

For a while now, I've been wanting to incorporate Postmark - an email delivery service for web apps - in to my blog operations. I've been wanting to ween myself off of Mailchimp, as it's become a bit of a rathole for my love of design. Luckily, with Ghost I can use just about any email delivery service, Postmark included.

The first step is to edit the config.js file the the Ghost directory on my VPS. Under the Production section of the file, there is an option to specify the mail service you want to use. The Setting Up Email doc on the Ghost website gives you a good starting point, listing several example options like Rackspace's Mailgun, Amazon SES, and Gmail. With just a few tweaks of the configuration file, Postmark works flawlessly as well.

mail: {  
        transport: 'SMTP',
        options: {
            service: 'Postmark',
            auth: {
                user: 'API KEY HERE', // Postmark username
                pass: 'API KEY HERE'  // Postmark password

One thing to be weary of is to include the trailing , after the }, otherwise you'll throw your configuration file off. It took me about 15 minutes to realize this when my npm instance threw errors upon relaunch.

Eventually, the developers hope to incorporate the mail capability of Ghost into a service adding to the extensibility of the platform, such as using it for notifications when there's a new post, etc. I hope this comes soon, as I could see it replacing my need to use Mailchimp entirely.

One last thing: in order to use Postmark as an SMTP service, you must enable this feature in your Postmark account. This is a simple enough procedure. Locate your server instance under your Postmark account, select Credentials and about half way down the page you'll see a section that looks like this:

Simply set SMTP to enable and you're good to go.

Happy Postmarking!