mailparser
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -436,2 +436,9 @@ | ||
break; | ||
case "reply-to": | ||
if(this._currentNode.replyTo && this._currentNode.replyTo.length){ | ||
this._currentNode.replyTo = this._currentNode.replyTo.concat(mimelib.parseAddresses(value)); | ||
}else{ | ||
this._currentNode.replyTo = mimelib.parseAddresses(value); | ||
} | ||
break; | ||
case "cc": | ||
@@ -924,2 +931,6 @@ if(this._currentNode.cc && this._currentNode.cc.length){ | ||
if(this.mimeTree.replyTo){ | ||
returnValue.replyTo = this.mimeTree.replyTo; | ||
} | ||
if(this.mimeTree.to){ | ||
@@ -926,0 +937,0 @@ returnValue.to = this.mimeTree.to; |
{ | ||
"name": "mailparser", | ||
"description": "Asynchronous and non-blocking parser for mime encoded e-mail messages", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"author" : "Andris Reinman", | ||
@@ -6,0 +6,0 @@ "maintainers":[ |
@@ -264,2 +264,18 @@ var MailParser = require("../lib/mailparser").MailParser, | ||
}); | ||
}, | ||
"Reply To address": function(test){ | ||
var encodedText = "Reply-TO: andris <andris@disposebox.com>\r" + | ||
"Subject: ÕÄÖÜ\n" + | ||
"\r" + | ||
"1234", | ||
mail = new Buffer(encodedText, "utf-8"); | ||
test.expect(1); | ||
var mailparser = new MailParser(); | ||
mailparser.end(mail); | ||
mailparser.on("end", function(mail){ | ||
test.deepEqual(mail.replyTo, [{name:"andris", address:"andris@disposebox.com"}]); | ||
test.done(); | ||
}); | ||
} | ||
@@ -266,0 +282,0 @@ |
120449
2600