nodemailer
Advanced tools
Comparing version 6.0.0 to 6.1.0
# CHANGELOG | ||
## 6.1.0 2019-04-06 | ||
- Added new message property `amp` for providing AMP4EMAIL content | ||
## 6.0.0 2019-03-25 | ||
@@ -4,0 +8,0 @@ |
@@ -197,2 +197,3 @@ /* eslint no-undefined: 0 */ | ||
watchHtml, | ||
amp, | ||
icalEvent, | ||
@@ -226,2 +227,13 @@ eventObject; | ||
if (this.mail.amp) { | ||
if (typeof this.mail.amp === 'object' && (this.mail.amp.content || this.mail.amp.path || this.mail.amp.href || this.mail.amp.raw)) { | ||
amp = this.mail.amp; | ||
} else { | ||
amp = { | ||
content: this.mail.amp | ||
}; | ||
} | ||
amp.contentType = 'text/x-amp-html' + (!amp.encoding && mimeFuncs.isPlainText(amp.content) ? '' : '; charset=utf-8'); | ||
} | ||
// only include the calendar alternative if there are no attachments | ||
@@ -278,2 +290,3 @@ // otherwise you might end up in a blank screen on some clients | ||
.concat(watchHtml || []) | ||
.concat(amp || []) | ||
.concat(html || []) | ||
@@ -280,0 +293,0 @@ .concat(eventObject || []) |
@@ -50,3 +50,3 @@ 'use strict'; | ||
resolveAll(callback) { | ||
let keys = [[this.data, 'html'], [this.data, 'text'], [this.data, 'watchHtml'], [this.data, 'icalEvent']]; | ||
let keys = [[this.data, 'html'], [this.data, 'text'], [this.data, 'watchHtml'], [this.data, 'amp'], [this.data, 'icalEvent']]; | ||
@@ -151,3 +151,3 @@ if (this.data.alternatives && this.data.alternatives.length) { | ||
['html', 'text', 'watchHtml'].forEach(key => { | ||
['html', 'text', 'watchHtml', 'amp'].forEach(key => { | ||
if (data[key] && data[key].content) { | ||
@@ -154,0 +154,0 @@ if (typeof data[key].content === 'string') { |
{ | ||
"name": "nodemailer", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "Easy as cake e-mail sending from your Node.js applications", | ||
@@ -38,3 +38,3 @@ "main": "lib/nodemailer.js", | ||
"proxy-test-server": "1.0.0", | ||
"sinon": "7.3.0", | ||
"sinon": "7.3.1", | ||
"smtp-server": "3.5.0" | ||
@@ -41,0 +41,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
461061
11277