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.18 to 6.5.0

6

CHANGELOG.md
# CHANGELOG
## 6.5.0 2021-02-26
- Pass through textEncoding to subnodes
- Added support for AWS SES v3 SDK
- Fixed tests
## 6.4.18 2021-02-11

@@ -4,0 +10,0 @@

1

lib/mail-composer/index.js

@@ -478,2 +478,3 @@ /* eslint no-undefined: 0 */

filename: element.filename,
textEncoding: this.mail.textEncoding,
disableUrlAccess: this.mail.disableUrlAccess,

@@ -480,0 +481,0 @@ disableFileAccess: this.mail.disableFileAccess,

2

lib/mime-node/index.js

@@ -454,3 +454,3 @@ /* eslint no-undefined: 0, prefer-spread: 0, no-control-regex: 0 */

// we can not check content for a stream, so either use preferred encoding or fallback to QP
transferEncoding = this.transferEncoding === 'B' ? 'base64' : 'quoted-printable';
transferEncoding = this.textEncoding === 'B' ? 'base64' : 'quoted-printable';
}

@@ -457,0 +457,0 @@ } else if (!/^(multipart|message)\//i.test(contentType)) {

@@ -242,32 +242,60 @@ 'use strict';

this.ses.sendRawEmail(sesMessage, (err, data) => {
if (err) {
this.logger.error(
{
err,
tnx: 'send'
},
'Send error for %s: %s',
messageId,
err.message
);
statObject.pending = false;
return callback(err);
let ses = (this.ses.aws ? this.ses.ses : this.ses) || {};
let aws = this.ses.aws || {};
let getRegion = cb => {
if (ses.config && typeof ses.config.region === 'function') {
// promise
return ses.config
.region()
.then(region => cb(null, region))
.catch(err => cb(err));
}
return cb(null, (ses.config && ses.config.region) || 'us-east-1');
};
let region = (this.ses.config && this.ses.config.region) || 'us-east-1';
if (region === 'us-east-1') {
region = 'email';
getRegion((err, region) => {
if (err || !region) {
region = 'us-east-1';
}
statObject.pending = false;
callback(null, {
envelope: {
from: envelope.from,
to: envelope.to
},
messageId: '<' + data.MessageId + (!/@/.test(data.MessageId) ? '@' + region + '.amazonses.com' : '') + '>',
response: data.MessageId,
raw
});
let sendPromise;
if (typeof ses.send === 'function' && aws.SendRawEmailCommand) {
// v3 API
sendPromise = ses.send(new aws.SendRawEmailCommand(sesMessage));
} else {
// v2 API
sendPromise = ses.sendRawEmail(sesMessage).promise();
}
sendPromise
.then(data => {
if (region === 'us-east-1') {
region = 'email';
}
statObject.pending = false;
callback(null, {
envelope: {
from: envelope.from,
to: envelope.to
},
messageId: '<' + data.MessageId + (!/@/.test(data.MessageId) ? '@' + region + '.amazonses.com' : '') + '>',
response: data.MessageId,
raw
});
})
.catch(err => {
this.logger.error(
{
err,
tnx: 'send'
},
'Send error for %s: %s',
messageId,
err.message
);
statObject.pending = false;
callback(err);
});
});

@@ -274,0 +302,0 @@ })

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

@@ -26,3 +26,3 @@ "main": "lib/nodemailer.js",

"eslint-config-nodemailer": "1.2.0",
"eslint-config-prettier": "7.2.0",
"eslint-config-prettier": "8.1.0",
"grunt": "1.3.0",

@@ -35,3 +35,3 @@ "grunt-cli": "1.3.2",

"libqp": "1.1.0",
"mocha": "8.2.1",
"mocha": "8.3.0",
"nodemailer-ntlm-auth": "1.0.1",

@@ -45,4 +45,3 @@ "proxy": "1.0.2",

"node": ">=6.0.0"
},
"dependencies": {}
}
}
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