node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



Sends out an email to the given recipient with information about an uncaught exception.


Screenshot 1


The following versions are required for Hotload:

  • Node.js >= 0.2.2
  • npm >= 0.1.25

Install it simply via npm:

npm install node-exception-notifier


new ExceptionNotifier( options )

Creates a new instance of ExceptionNotifier. options is an object with the following possible properties:

  • to: Defines where the exception notifications should be sent
  • from: Defines the "From" header for the notification mails. Defaults to Node.js Exception Notifer <>
  • host, port: SMTP mail host and port
  • domain: SMTP host, usually the same as host
  • auth_user, auth_password: Options for SMTP authentification
  • exit: Defines whether the process should exit after an uncaught exception has been notified


var ExceptionNotifier, notifier;
ExceptionNotifier = require("./index").ExceptionNotifier;
notifier = new ExceptionNotifier({
  to: "Recipient <>",
  from: "Node.js Exception Notifier <>",
  host: "",
  port: 25,
  domain: "",
  auth_user: "user",
  auth_password: "password",
  exit: true
throw new Error("Urgh I'm a dirty error.");
This would send a mail to which looks like this:

To: Recipient (
From: Node.js Exception Notifier (
Subject: Uncaught Exception: Urgh I'm a dirty error.

Error: Urgh I'm a dirty error.
   at Object.<anonymous> (/Users/sascha/development/node/node-exception-notifier/example.js:13:7)
   at Module._compile (node.js:423:30)
   at Object..js (node.js:429:14)
   at Module.load (node.js:355:35)
   at Array.<anonymous> (node.js:443:26)
   at EventEmitter._tickCallback (node.js:60:24)


Copyright (c) 2011 FILSH Media GmbH, released under the MIT license