Skip to content

Instantly share code, notes, and snippets.

@serby
Created September 9, 2011 08:37
Show Gist options
  • Save serby/1205774 to your computer and use it in GitHub Desktop.
Save serby/1205774 to your computer and use it in GitHub Desktop.
Showing the nodemailer global send engine bug
function first() {
var nodemailer = require('nodemailer');
console.log(nodemailer.sendmail);
console.log(nodemailer.SMTP);
}
function second() {
var nodemailer = require('nodemailer');
nodemailer.sendmail = true;
console.log(nodemailer.sendmail);
console.log(nodemailer.SMTP);
}
function third() {
var nodemailer = require('nodemailer');
nodemailer.SMTP = { host: 'localhost' };
console.log(nodemailer.sendmail);
console.log(nodemailer.SMTP);
}
first();
second();
third();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment