diff options
author | scottmotte <scott@scottmotte.com> | 2013-12-18 16:49:49 -0800 |
---|---|---|
committer | scottmotte <scott@scottmotte.com> | 2013-12-18 16:49:49 -0800 |
commit | a8b066022f79cb636a17d30001a781f8686a3447 (patch) | |
tree | 852b7ddb0e38f377d291d9a0ac488efd274dac3f /lib/email.js | |
parent | 195edbcb55de927120f148f89339b5f800b793a5 (diff) | |
download | sendgrid-nodejs-a8b066022f79cb636a17d30001a781f8686a3447.zip sendgrid-nodejs-a8b066022f79cb636a17d30001a781f8686a3447.tar.gz sendgrid-nodejs-a8b066022f79cb636a17d30001a781f8686a3447.tar.bz2 |
Replaces smtpapi_header with xsmtpapi nodejs module
Diffstat (limited to 'lib/email.js')
-rw-r--r-- | lib/email.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/email.js b/lib/email.js index d84e8a1..c895de4 100644 --- a/lib/email.js +++ b/lib/email.js @@ -1,7 +1,7 @@ "use strict"; -var SmtpapiHeaders = require('./smtpapi_headers'); var FileHandler = require('./file_handler'); +var xsmtpapi = require('xsmtpapi'); var _ = require('lodash'); var request = require('request'); var fs = require('fs'); @@ -28,7 +28,7 @@ function Email(params) { this.to = params.to || []; this.from = params.from || ''; - this.smtpapi = params.smtpapi || new SmtpapiHeaders(); + this.smtpapi = params.smtpapi || new xsmtpapi.Header(); this.subject = params.subject || ''; this.text = params.text || ''; this.html = params.html || ''; @@ -202,7 +202,7 @@ Email.prototype.toWebFormat = function() { var web = { to : this.to, from : this.from, - 'x-smtpapi' : this.smtpapi.toJson(), + 'x-smtpapi' : this.smtpapi.toJsonString(), subject : this.subject, text : this.text, html : this.html, |