feat(mailer): disable X-Mailer header in emails (#1881) r=vladikoff,philbooth

This commit is contained in:
Sean McArthur 2017-05-04 06:33:35 -07:00 коммит произвёл Vlad Filippov
Родитель 36ec6f7e35
Коммит 4948a7eb3b
2 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -231,6 +231,7 @@ module.exports = function (log) {
subject: localized.subject, subject: localized.subject,
text: localized.text, text: localized.text,
html: localized.html, html: localized.html,
xMailer: false,
headers: extend({ headers: extend({
'Content-Language': localized.language, 'Content-Language': localized.language,
'X-Template-Name': message.template 'X-Template-Name': message.template

Просмотреть файл

@ -81,6 +81,7 @@ describe('remote account create', function() {
) )
.then( .then(
function (emailData) { function (emailData) {
assert.equal(emailData.headers['x-mailer'], undefined)
assert.equal(emailData.headers['x-template-name'], 'verifySyncEmail') assert.equal(emailData.headers['x-template-name'], 'verifySyncEmail')
assert.equal(emailData.html.indexOf('IP address') > -1, true) // Ensure some location data is present assert.equal(emailData.html.indexOf('IP address') > -1, true) // Ensure some location data is present
return emailData.headers['x-verify-code'] return emailData.headers['x-verify-code']