Socket
Socket
Sign inDemoInstall

nodemailer

Package Overview
Dependencies
Maintainers
1
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodemailer - npm Package Compare versions

Comparing version 6.4.15 to 6.4.16

4

CHANGELOG.md
# CHANGELOG
## 6.4.16 2020-11-12
- Applied updated prettier formating rules
## 6.4.15 2020-11-06

@@ -4,0 +8,0 @@

5

lib/dkim/message-parser.js

@@ -149,6 +149,3 @@ 'use strict';

.map(line => ({
key: line
.substr(0, line.indexOf(':'))
.trim()
.toLowerCase(),
key: line.substr(0, line.indexOf(':')).trim().toLowerCase(),
line

@@ -155,0 +152,0 @@ }));

@@ -113,6 +113,3 @@ 'use strict';

let valueParts = cookiePart.split('=');
let key = valueParts
.shift()
.trim()
.toLowerCase();
let key = valueParts.shift().trim().toLowerCase();
let value = valueParts.join('=').trim();

@@ -119,0 +116,0 @@ let domain;

@@ -13,3 +13,3 @@ 'use strict';

module.exports = function(url, options) {
module.exports = function (url, options) {
return fetch(url, options);

@@ -37,7 +37,3 @@ };

let parsed = urllib.parse(url);
let method =
(options.method || '')
.toString()
.trim()
.toUpperCase() || 'GET';
let method = (options.method || '').toString().trim().toUpperCase() || 'GET';
let finished = false;

@@ -120,7 +116,3 @@ let cookies;

// if method is not provided, use POST instead of GET
method =
(options.method || '')
.toString()
.trim()
.toUpperCase() || 'POST';
method = (options.method || '').toString().trim().toUpperCase() || 'POST';
}

@@ -127,0 +119,0 @@

@@ -67,8 +67,3 @@ 'use strict';

if (!attachment.filename) {
attachment.filename =
(attachment.path || attachment.href || '')
.split('/')
.pop()
.split('?')
.shift() || 'attachment-' + (i + 1);
attachment.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1);
if (attachment.filename.indexOf('.') < 0) {

@@ -75,0 +70,0 @@ attachment.filename += '.' + mimeFuncs.detectExtension(attachment.contentType);

@@ -16,12 +16,7 @@ 'use strict';

const ETHEREAL_WEB = (process.env.ETHEREAL_WEB || 'https://ethereal.email').replace(/\/+$/, '');
const ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes(
(process.env.ETHEREAL_CACHE || 'yes')
.toString()
.trim()
.toLowerCase()
);
const ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes((process.env.ETHEREAL_CACHE || 'yes').toString().trim().toLowerCase());
let testAccount = false;
module.exports.createTransport = function(transporter, defaults) {
module.exports.createTransport = function (transporter, defaults) {
let urlConfig;

@@ -64,3 +59,3 @@ let options;

module.exports.createTestAccount = function(apiUrl, callback) {
module.exports.createTestAccount = function (apiUrl, callback) {
let promise;

@@ -133,3 +128,3 @@

module.exports.getTestMessageUrl = function(info) {
module.exports.getTestMessageUrl = function (info) {
if (!info || !info.response) {

@@ -136,0 +131,0 @@ return false;

@@ -73,2 +73,10 @@ 'use strict';

const hasInvalidAddresses = []
.concat(envelope.from || [])
.concat(envelope.to || [])
.some(addr => /^-/.test(addr));
if (hasInvalidAddresses) {
return done(new Error('Can not send mail. Invalid envelope addresses.'));
}
if (this.args) {

@@ -75,0 +83,0 @@ // force -i to keep single dots

@@ -279,3 +279,3 @@ /* eslint no-console: 0 */

module.exports.callbackPromise = (resolve, reject) =>
function() {
function () {
let args = Array.from(arguments);

@@ -361,3 +361,3 @@ let err = args.shift();

*/
module.exports.assign = function(/* target, ... sources */) {
module.exports.assign = function (/* target, ... sources */) {
let args = Array.from(arguments);

@@ -494,11 +494,3 @@ let target = args.shift() || {};

message.split(/\r?\n/).forEach(line => {
console.log(
'[%s] %s %s',
new Date()
.toISOString()
.substr(0, 19)
.replace(/T/, ' '),
levelNames.get(level),
prefix + line
);
console.log('[%s] %s %s', new Date().toISOString().substr(0, 19).replace(/T/, ' '), levelNames.get(level), prefix + line);
});

@@ -505,0 +497,0 @@ };

@@ -47,3 +47,3 @@ 'use strict';

let finished = false;
let tempSocketErr = function(err) {
let tempSocketErr = function (err) {
if (finished) {

@@ -50,0 +50,0 @@ return;

@@ -48,6 +48,3 @@ 'use strict';

this.id = crypto
.randomBytes(8)
.toString('base64')
.replace(/\W/g, '');
this.id = crypto.randomBytes(8).toString('base64').replace(/\W/g, '');
this.stage = 'init';

@@ -77,6 +74,3 @@

Object.keys(this.options.customAuth || {}).forEach(key => {
let mapKey = (key || '')
.toString()
.trim()
.toUpperCase();
let mapKey = (key || '').toString().trim().toUpperCase();
if (!mapKey) {

@@ -429,7 +423,3 @@ return;

// Select SASL authentication method
this._authMethod =
(this._auth.method || '')
.toString()
.trim()
.toUpperCase() || false;
this._authMethod = (this._auth.method || '').toString().trim().toUpperCase() || false;

@@ -604,3 +594,3 @@ if (!this._authMethod && this._auth.oauth2 && !this._auth.credentials) {

let returned = false;
let callback = function() {
let callback = function () {
if (returned) {

@@ -607,0 +597,0 @@ return;

@@ -44,5 +44,5 @@ 'use strict';

*/
module.exports = function(key) {
module.exports = function (key) {
key = normalizeKey(key.split('@').pop());
return normalized[key] || false;
};

@@ -25,6 +25,6 @@ {

},
"Ethereal": {
"aliases": ["ethereal.email"],
"host": "smtp.ethereal.email",
"host": "smtp.ethereal.email",
"port": 587

@@ -31,0 +31,0 @@ },

@@ -266,7 +266,7 @@ 'use strict';

let errorMessage = data.error;
if(data.error_description) {
errorMessage += ': ' + data.error_description;
if (data.error_description) {
errorMessage += ': ' + data.error_description;
}
if(data.error_uri) {
errorMessage += ' (' + data.error_uri + ')';
if (data.error_uri) {
errorMessage += ' (' + data.error_uri + ')';
}

@@ -273,0 +273,0 @@ return callback(new Error(errorMessage));

{
"name": "nodemailer",
"version": "6.4.15",
"version": "6.4.16",
"description": "Easy as cake e-mail sending from your Node.js applications",

@@ -5,0 +5,0 @@ "main": "lib/nodemailer.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc