Now you can send bbc or cc only emails.

This commit is contained in:
Fredrik Andersson 2012-11-09 23:31:28 +01:00
parent aea35a3c41
commit 73762e6163
3 changed files with 9 additions and 2 deletions

4
.gitignore vendored
View File

@ -1,3 +1,7 @@
/node_modules/
/test/config.js
/npm-debug.log
*.swp
*.swo
*~

View File

@ -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 File

@ -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");
}