From 2cafcfae5c593ddcb643ab4408b501f72408b2c5 Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Wed, 22 Jun 2011 11:21:09 -0700 Subject: [PATCH] moved email testing hack to proper place --- browserid/lib/email.js | 3 --- browserid/lib/emailconfig.js | 9 --------- run.js | 12 ++++++++++++ 3 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 browserid/lib/emailconfig.js diff --git a/browserid/lib/email.js b/browserid/lib/email.js index 99a04caa5..bc5fa584c 100644 --- a/browserid/lib/email.js +++ b/browserid/lib/email.js @@ -6,9 +6,6 @@ mustache = require('mustache'); const template = fs.readFileSync(path.join(__dirname, "prove_template.txt")).toString(); -// config for mail server -emailconfig = require('./emailconfig') - exports.sendVerificationEmail = function(email, site, secret) { var url = "https://browserid.org/prove.html?token=" + secret; diff --git a/browserid/lib/emailconfig.js b/browserid/lib/emailconfig.js deleted file mode 100644 index 96268a1e1..000000000 --- a/browserid/lib/emailconfig.js +++ /dev/null @@ -1,9 +0,0 @@ -var nodemailer = require('nodemailer'); - -nodemailer.EmailMessage.prototype.send = function(callback) { - this.prepareVariables(); - var headers = this.generateHeaders(), - body = this.generateBody(); - console.log(headers); - console.log(body); -}; \ No newline at end of file diff --git a/run.js b/run.js index 915da6e66..ff7ed63ab 100755 --- a/run.js +++ b/run.js @@ -13,6 +13,18 @@ var PRIMARY_HOST = "127.0.0.1"; var boundServers = [ ]; +// +// this is the test harness, don't send emails, dump them to stdout +// +var nodemailer = require('nodemailer'); +nodemailer.EmailMessage.prototype.send = function(callback) { + this.prepareVariables(); + var headers = this.generateHeaders(), + body = this.generateBody(); + console.log(headers); + console.log(body); +}; + // given a buffer, find and replace all production hostnames // with development URLs function subHostNames(data) { -- GitLab