Using Mandrill With Ghost


2 minute read


###Ghosting Around I’ve been tinkering around with Ghost recently and found it to be a new but promising platform in the main. There are certainly some things it will need to achieve any sort of significant user-base (plugins, apps, etc., which are coming in future releases https://github.com/tryghost/ghost/). At the very least, it’s great that there are open-source, well-supported options for blogging platforms that aren’t Wordpress and it’s cousins. I suppose it can’t hurt Nodejs and Javascript Development in general either for there to be more people using node-based platforms either.

So far, the prevailing styling that developers and designers are going for with Ghost is minimal and content-focused. This makes sense for a platform that doesn’t have the robust functionality that some other frameworks do. For this meantime, I really enjoy this focus on simplicity and content, since it has forced people (for the most part) to create blogs that are content-focused.

###Using Mandrill With Ghost The version of Ghost at time of writing (0.4.2) doesn’t include a mechanism for sending mail on it’s own, so you’ll need to use another solution to send password resets and all that fun stuff. I love Mailchimp’s Mandrill service. It’s great, easy-to-use, and best of all you can use it for free within the 10,000 send limit. Unless you’re really going for it with your new Ghost installation or forget your password every few minutes, that should do.

First, you’ll want to use nano to edit the config portion of your Ghost installation:

nano var/www/ghost/config.js

Then, you can move into the production section of the config.js and change the following section to reflect your actual credentials.

mail: {
   transport: 'SMTP',
   host: 'smtp.mandrillapp.com',
   port: 587,
   options: {
      service: 'Mandrill',
           auth:{
                user: 'MANDRILL_API_USERNAME_HERE',
                pass: 'MANDRILL_API_KEY_HERE'
                }
             }
       }

Make sure that you’re editing the production object in the config.js file. Close out the text-editor (in nano you use control + x to close it out, followed by answering the save prompt).

###All done That’s it! You should now be able to use Mandrill to send email for your Ghost blog.

Related: