diff options
author | Elmer Thomas <elmer@ThinkingSerious.com> | 2015-10-13 10:27:25 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@ThinkingSerious.com> | 2015-10-13 10:27:25 -0700 |
commit | a5d9f8985136d948a8c47e525192a87ed60f61bf (patch) | |
tree | 74f7d8ec5d7d9d0643574e6190b008009d847992 /lib/email.js | |
parent | 2cb34372ef0f31352f7c90015a45e1200cb849da (diff) | |
parent | 7b0688796ed0a7e04c696f7af9695f57fdca5bad (diff) | |
download | sendgrid-nodejs-a5d9f8985136d948a8c47e525192a87ed60f61bf.zip sendgrid-nodejs-a5d9f8985136d948a8c47e525192a87ed60f61bf.tar.gz sendgrid-nodejs-a5d9f8985136d948a8c47e525192a87ed60f61bf.tar.bz2 |
Merge pull request #187 from sendgrid/tb-ccwebapiv2.0.0
Change to param to use Web API instead of X-SMTPAPI header
Diffstat (limited to 'lib/email.js')
-rw-r--r-- | lib/email.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/email.js b/lib/email.js index 5f6be7a..292043d 100644 --- a/lib/email.js +++ b/lib/email.js @@ -59,12 +59,22 @@ Email.prototype.setHeaders = function(object_literal) { }; Email.prototype.addTo = function(to) { + this.to.push(to); + return this; +}; + +Email.prototype.setSmtpapiTos = function(tos) { + this.smtpapi.setTos(tos); + return this; +}; + +Email.prototype.addSmtpapiTo = function(to) { this.smtpapi.addTo(to); return this; }; Email.prototype.setTos = function(tos) { - this.smtpapi.setTos(tos); + this.to = tos; return this; }; |