Skip to content
Preview your Nodemailer emails in your browser.
JavaScript
Latest commit f5ada5c Nov 11, 2013 David Cornu Merge pull request #2 from RobertWHurst/master
Remove "Mac only" from readme.md
Failed to load latest commit information.
.gitignore Add working version, still missing tests Jan 17, 2013
.travis.yml
README.md Remove "Mac only" from readme.md Nov 11, 2013
index.js Older node takes a string argument instead of a options object for wr… Nov 11, 2013
package.json
template.jade Add working version, still missing tests Jan 17, 2013
test.js Improve tests Nov 11, 2013

README.md

Mail Preview

Preview your Nodemailer emails in your browser (Inspired by Letter Opener).

Build Status

Usage

  1. Install via npm

    $ npm install mail-preview
    
  2. Use it with Nodemailer

    var nodemailer = require('nodemailer');
    var path = require('path');
    require('mail-preview');
    
    var tmpdir = path.join(__dirname, 'tmp', 'nodemailer');
    
    var transport = nodemailer.createTransport('MailPreview', {
      dir: tmpdir,  // defaults to ./tmp/nodemailer
      browser: true // open sent email in browser (defaults to true)
    });

    Any emails sent through the MailPreview transport will be written to the tmpdir and opened in a browser (unless browser is set to false).

Development

Clone the repo

$ git clone git@github.com:davidcornu/mail-preview.git

Install dependencies

$ npm install

Run the tests

$ npm test
Something went wrong with that request. Please try again.