Permalink
Browse files

Now you can send bbc or cc only emails.

  • Loading branch information...
1 parent aea35a3 commit 73762e6163b3b1bb4d3735212a7a1f3620406a50 @fsrc fsrc committed Nov 9, 2012
Showing with 9 additions and 2 deletions.
  1. +4 −0 .gitignore
  2. +4 −1 smtp/client.js
  3. +1 −1 smtp/message.js
View
@@ -1,3 +1,7 @@
/node_modules/
/test/config.js
/npm-debug.log
+*.swp
+*.swo
+*~
+
View
@@ -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
@@ -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");
}

0 comments on commit 73762e6

Please sign in to comment.