From 4948a7eb3b5d4c5188c454d2bdf234338a5698da Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Thu, 4 May 2017 06:33:35 -0700 Subject: [PATCH] feat(mailer): disable X-Mailer header in emails (#1881) r=vladikoff,philbooth --- lib/senders/email.js | 1 + test/remote/account_create_tests.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/senders/email.js b/lib/senders/email.js index d632d15c..974f0853 100644 --- a/lib/senders/email.js +++ b/lib/senders/email.js @@ -231,6 +231,7 @@ module.exports = function (log) { subject: localized.subject, text: localized.text, html: localized.html, + xMailer: false, headers: extend({ 'Content-Language': localized.language, 'X-Template-Name': message.template diff --git a/test/remote/account_create_tests.js b/test/remote/account_create_tests.js index ff8f4cf3..cacbce1e 100644 --- a/test/remote/account_create_tests.js +++ b/test/remote/account_create_tests.js @@ -81,6 +81,7 @@ describe('remote account create', function() { ) .then( function (emailData) { + assert.equal(emailData.headers['x-mailer'], undefined) assert.equal(emailData.headers['x-template-name'], 'verifySyncEmail') assert.equal(emailData.html.indexOf('IP address') > -1, true) // Ensure some location data is present return emailData.headers['x-verify-code']