Comparing version 0.3.13 to 0.3.15
{ | ||
"name": "emailjs", | ||
"description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server", | ||
"version": "0.3.13", | ||
"author": "eleith", | ||
"contributors":["izuzak", "Hiverness", "mscdex", "jimmybergman"], | ||
"repository": | ||
{ | ||
"type": "git", | ||
"url": "http://github.com/eleith/emailjs.git" | ||
}, | ||
"dependencies": | ||
{ | ||
"moment" : "= 1.7.0", | ||
"name": "emailjs", | ||
"description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server", | ||
"version": "0.3.15", | ||
"author": "eleith", | ||
"contributors": [ | ||
"izuzak", | ||
"Hiverness", | ||
"mscdex", | ||
"jimmybergman" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/eleith/emailjs.git" | ||
}, | ||
"dependencies": { | ||
"addressparser": "^0.3.2", | ||
"mimelib": "0.2.14", | ||
"moment": "= 1.7.0", | ||
"starttls": "0.2.1" | ||
}, | ||
"optionalDependencies": | ||
{ | ||
"bufferjs": "=1.1.0" | ||
}, | ||
"devDependencies": | ||
{ | ||
}, | ||
"optionalDependencies": { | ||
"bufferjs": "=1.1.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "= 1.7.4", | ||
@@ -28,10 +30,11 @@ "chai": "= 1.1.0", | ||
"mailparser": "0.4.1", | ||
"iconv": "2.0.7" | ||
}, | ||
"engine": ["node >= 0.10"], | ||
"main": "email", | ||
"scripts": | ||
{ | ||
"test": "mocha -R spec -t 5000" | ||
} | ||
"iconv": "2.1.6" | ||
}, | ||
"engine": [ | ||
"node >= 0.10" | ||
], | ||
"main": "email", | ||
"scripts": { | ||
"test": "mocha -R spec -t 5000" | ||
} | ||
} |
var smtp = require('./smtp'); | ||
var smtpError = require('./error'); | ||
var message = require('./message'); | ||
var address = require('./address'); | ||
var addressparser= require('addressparser'); | ||
@@ -100,4 +100,4 @@ var Client = function(server) | ||
message: msg, | ||
to: address.parse(msg.header.to), | ||
from: address.parse(msg.header.from)[0].address, | ||
to: addressparser(msg.header.to), | ||
from: addressparser(msg.header.from)[0].address, | ||
callback: callback || function() {} | ||
@@ -107,9 +107,9 @@ }; | ||
if(msg.header.cc) | ||
stack.to = stack.to.concat(address.parse(msg.header.cc)); | ||
stack.to = stack.to.concat(addressparser(msg.header.cc)); | ||
if(msg.header.bcc) | ||
stack.to = stack.to.concat(address.parse(msg.header.bcc)); | ||
stack.to = stack.to.concat(addressparser(msg.header.bcc)); | ||
if(msg.header['return-path'] && address.parse(msg.header['return-path']).length) | ||
stack.returnPath = address.parse(msg.header['return-path'])[0].address; | ||
if(msg.header['return-path'] && addressparser(msg.header['return-path']).length) | ||
stack.returnPath = addressparser(msg.header['return-path'])[0].address; | ||
@@ -116,0 +116,0 @@ self.queue.push(stack); |
@@ -8,3 +8,3 @@ var stream = require('stream'); | ||
var mimelib = require('mimelib'); | ||
var address = require('./address'); | ||
var addressparser = require('addressparser'); | ||
var CRLF = "\r\n"; | ||
@@ -36,16 +36,6 @@ var MIMECHUNK = 76; // MIME standard wants 76 char chunks when sending out. | ||
{ | ||
// an array of emails or name+emails | ||
if (Array.isArray(l)) { | ||
l = l.join(', '); | ||
} | ||
// a string of comma separated emails or comma separated name+<emails> | ||
if(typeof l == 'string') { | ||
var addresses = address.parse(l); | ||
return addresses.map(function(addr) { | ||
return addr.label !== '' ? mimelib.encodeMimeWord(addr.label, 'Q', 'utf-8') + ' ' + '<' + addr.address + '>' : addr.address; | ||
}).join(', '); | ||
} | ||
return null; | ||
var addresses = addressparser(l); | ||
return addresses.map(function(addr) { | ||
return addr.name ? mimelib.encodeMimeWord(addr.name, 'Q', 'utf-8').replace(/,/g, '=2C') + ' ' + '<' + addr.address + '>' : addr.address; | ||
}).join(', '); | ||
} | ||
@@ -52,0 +42,0 @@ |
@@ -259,3 +259,5 @@ /* | ||
port: self.port, | ||
pair: tls.createSecurePair(crypto.createCredentials(self.tls), false) | ||
pair: tls.createSecurePair( | ||
tls.createSecureContext ? tls.createSecureContext(self.tls) : crypto.createCredentials(self.tls), | ||
false) | ||
}, secured).cleartext; | ||
@@ -262,0 +264,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
49925
5
9
1248
+ Addedaddressparser@^0.3.2
+ Addedaddressparser@0.3.2(transitive)