Use IIS pickup directory with Nodemailer

In the ASP.NET ecosystem I often make use of the IIS pickup directory. It's easy, it's free. Period.

When installing Ghost you will always get bothered by a message on the login screen saying something like mimimi... no smtp server configured.

Unfortunately Nodemailer, the mailing library used by Ghost, does not support my beloved pickup directory and a 3rd party service was not very satisfying. It's just a simple blog!

Well... I forked the repository and introduced a new transport object which stores the generated mail in a directory of your choice :)


As of version 0.6.0 it is part of Nodemailer. Have a look at the README for details.

var transport = nodemailer.createTransport('PICKUP', {
  directory: 'path/to/mails'

// or

var transport = nodemailer.createTransport('PICKUP', 'path/to/mails');

Configure Ghost to use the pickup directory

After creating a backup and applying the necassary changes, this is how Ghosts's config.js looks on my machine:

production: {
  url: '',
  mail: {
    transport: 'PICKUP',
    options: {                
      directory: 'path/to/mails'

Here is a mail that has been sent via the pickup directory after requesting a new password:

Password reset mail