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.1.1 to 0.1.2

11

lib/mailcomposer.js

@@ -18,2 +18,3 @@ var Stream = require("stream").Stream,

* <li><b>encoding</b> - forced transport encoding (quoted-printable, base64, 7bit or 8bit)</li>
* <li><b>keepBcc</b> - include Bcc: field in the message headers (default is false)</li>
* </ul>

@@ -424,2 +425,12 @@ *

// BCC
// By default not included, set options.keepBcc to true to keep
if(this.options.keepBcc){
if(this._message.bcc && this._message.bcc.length){
[].concat(this._message.bcc).forEach((function(bcc){
this.addHeader("Bcc", bcc);
}).bind(this));
}
}
// REPLY-TO

@@ -426,0 +437,0 @@ if(this._message.replyTo && this._message.replyTo.length){

2

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

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

@@ -43,2 +43,3 @@ # mailcomposer

* **encoding** - sets transfer encoding for the textual parts (defaults to `"quoted-printable"`)
* **keepBcc** - if set to true, includes `Bcc:` field in the message headers. Useful for *sendmail* command.

@@ -45,0 +46,0 @@ ### Simple example

@@ -85,2 +85,18 @@ var testCase = require('nodeunit').testCase,

test.done();
},
"keepBcc off": function(test){
var mc = new MailComposer();
mc.setMessageOption({bcc: "andris@node.ee"});
mc._buildMessageHeaders();
test.ok(!mc._getHeader("Bcc"));
test.done();
},
"keepBcc on": function(test){
var mc = new MailComposer({keepBcc: true});
mc.setMessageOption({bcc: "andris@node.ee"});
mc._buildMessageHeaders();
test.equal(mc._getHeader("Bcc"), "andris@node.ee");
test.done();
}

@@ -87,0 +103,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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