Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mailparser

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailparser - npm Package Compare versions

Comparing version 2.7.6 to 2.7.7

.github/FUNDING.yml

24

lib/mail-parser.js

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

// https://github.com/bnoordhuis/node-iconv/issues/169
if (charset === 'ks_c_5601-1987') {
if (charset.toLowerCase() === 'ks_c_5601-1987') {
charset = 'CP949';

@@ -360,3 +360,3 @@ }

case 'return-path':
value = addressparser(this.libmime.decodeWords(value));
value = addressparser(value);
this.decodeAddresses(value);

@@ -505,4 +505,18 @@ value = {

decodeAddresses(addresses) {
addresses.forEach(address => {
address.name = (address.name || '').toString();
for (let i = 0; i < addresses.length; i++) {
let address = addresses[i];
address.name = (address.name || '').toString().trim();
if (!address.address && /^(=\?([^?]+)\?[Bb]\?[^?]*\?=)(\s*=\?([^?]+)\?[Bb]\?[^?]*\?=)*$/.test(address.name)) {
let parsed = addressparser(this.libmime.decodeWords(address.name));
if (parsed.length) {
parsed.forEach(entry => addresses.push(entry));
}
// remove current element
addresses.splice(i, 1);
i--;
continue;
}
if (address.name) {

@@ -523,3 +537,3 @@ try {

}
});
}
}

@@ -526,0 +540,0 @@

{
"name": "mailparser",
"version": "2.7.6",
"version": "2.7.7",
"description": "Parse e-mails",

@@ -25,11 +25,11 @@ "main": "index.js",

"linkify-it": "2.2.0",
"mailsplit": "4.4.1",
"nodemailer": "6.3.1",
"tlds": "1.203.1"
"mailsplit": "4.6.2",
"nodemailer": "6.4.0",
"tlds": "1.207.0"
},
"devDependencies": {
"ajv": "6.10.2",
"eslint": "6.6.0",
"eslint": "6.7.2",
"eslint-config-nodemailer": "1.2.0",
"eslint-config-prettier": "6.5.0",
"eslint-config-prettier": "6.7.0",
"grunt": "1.0.4",

@@ -36,0 +36,0 @@ "grunt-cli": "1.3.2",

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