New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nodemailer-mailgun-transport

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodemailer-mailgun-transport - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json

@@ -5,3 +5,3 @@ {

"description": "A transport module to use with nodemailer to leverage Mailgun's REST API",
"version": "1.2.0",
"version": "1.2.1",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -70,24 +70,32 @@ 'use strict';

function(done) {
// convert nodemailer attachments to mailgun-js attachements
if(mailData.attachment){
var a, b, data, aa = [];
for(var i in mailData.attachment){
a = mailData.attachment[i];
// convert nodemailer attachments to mailgun-js attachements
if(mailData.attachments){
var a, b, data, aa = [];
for(var i in mailData.attachments){
a = mailData.attachments[i];
// mailgunjs does not encode content string to a buffer
if (typeof a.content === 'string') {
data = new Buffer(a.content, a.encoding);
} else {
data = a.content || a.path || undefined;
// mailgunjs does not encode content string to a buffer
if (typeof a.content === 'string') {
data = new Buffer(a.content, a.encoding);
} else {
data = a.content || a.path || undefined;
}
//console.log(data);
b = new self.mailgun.Attachment({
data : data,
filename : a.filename || undefined,
contentType : a.contentType || undefined,
knownLength : a.knownLength || undefined
});
aa.push(b);
//console.log(b);
}
b = new self.mailgun.Attachment({
data : data,
filename : a.filename || undefined,
contentType : a.contentType || undefined,
knownLength : a.knownLength || undefined
});
mailData.attachment = aa;
delete mailData.attachments;
}
}
delete mail.data.headers;
var options = pickBy(mailData, function (value, key) {

@@ -94,0 +102,0 @@ if (whitelistExact.indexOf(key) !== -1) {

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