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

mailcomposer

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailcomposer - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

9

lib/mailcomposer.js

@@ -677,2 +677,11 @@ var Stream = require("stream").Stream,

// If in-reply-to message id is missing from the references, add it automatically
if(this._message.inReplyTo && this._message.inReplyTo.length &&
(this._message.references || "").toString().indexOf(this._message.inReplyTo) < 0){
this._message.references = [].
concat(this._message.inReplyTo).
concat(this._message.references || []).
join(" ");
}
// REFERENCES

@@ -679,0 +688,0 @@ if(this._message.references && this._message.references.length){

2

package.json
{
"name": "mailcomposer",
"description": "Compose E-Mail messages",
"version": "0.2.0",
"version": "0.2.1",
"author" : "Andris Reinman",

@@ -6,0 +6,0 @@ "maintainers":[

@@ -198,2 +198,66 @@ var testCase = require('nodeunit').testCase,

test.done();
},
"Auto references from in-reply-to 1": function(test){
var mc = new MailComposer();
mc.setMessageOption({
inReplyTo: "test"
});
mc._buildMessageHeaders();
test.equal(mc._getHeader("in-reply-to"), "<test>");
test.equal(mc._getHeader("references"), "<test>");
test.done();
},
"Auto references from in-reply-to 2": function(test){
var mc = new MailComposer();
mc.setMessageOption({
inReplyTo: "test",
references: "test"
});
mc._buildMessageHeaders();
test.equal(mc._getHeader("in-reply-to"), "<test>");
test.equal(mc._getHeader("references"), "<test>");
test.done();
},
"Auto references from in-reply-to 3": function(test){
var mc = new MailComposer();
mc.setMessageOption({
inReplyTo: "test",
references: ["test"]
});
mc._buildMessageHeaders();
test.equal(mc._getHeader("in-reply-to"), "<test>");
test.equal(mc._getHeader("references"), "<test>");
test.done();
},
"Auto references from in-reply-to 4": function(test){
var mc = new MailComposer();
mc.setMessageOption({
inReplyTo: "test",
references: ["<test2>"]
});
mc._buildMessageHeaders();
test.equal(mc._getHeader("in-reply-to"), "<test>");
test.equal(mc._getHeader("references"), "<test> <test2>");
test.done();
},
"Auto references from in-reply-to 5": function(test){
var mc = new MailComposer();
mc.setMessageOption({
inReplyTo: "test",
references: ["test2 test"]
});
mc._buildMessageHeaders();
test.equal(mc._getHeader("in-reply-to"), "<test>");
test.equal(mc._getHeader("references"), "<test2> <test>");
test.done();
}

@@ -200,0 +264,0 @@ };

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