Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Now you can send bbc or cc only emails.

  • Loading branch information...
commit 73762e6163b3b1bb4d3735212a7a1f3620406a50 1 parent aea35a3
@fsrc fsrc authored
Showing with 9 additions and 2 deletions.
  1. +4 −0 .gitignore
  2. +4 −1 smtp/client.js
  3. +1 −1  smtp/message.js
View
4 .gitignore
@@ -1,3 +1,7 @@
/node_modules/
/test/config.js
/npm-debug.log
+*.swp
+*.swo
+*~
+
View
5 smtp/client.js
@@ -72,7 +72,10 @@ Client.prototype =
{
var self = this;
- if(!(msg instanceof message.Message) && msg.from && msg.to && msg.text)
+ if(!(msg instanceof message.Message)
+ && msg.from
+ && (msg.to || msg.cc || msg.bcc)
+ && msg.text)
msg = message.create(msg);
if(msg instanceof message.Message)
View
2  smtp/message.js
@@ -125,7 +125,7 @@ Message.prototype =
{
callback(false, "message does not have a valid sender");
}
- if(!self.header.to)
+ if(!self.header.to && self.header.cc && self.header.bcc)
{
callback(false, "message does not have a valid recipient");
}
Please sign in to comment.
Something went wrong with that request. Please try again.