summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--lib/sendgrid.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 856e292..0409783 100644
--- a/README.md
+++ b/README.md
@@ -114,7 +114,7 @@ sendgrid.send(email, function(err, json) {
```javascript
var params = {
- smtpapi: new sengrid.SmtpapiHeaders(),
+ smtpapi: new sengrid.smtpapi(),
to: [],
toname: [],
from: '',
diff --git a/lib/sendgrid.js b/lib/sendgrid.js
index b7a17de..6bd809a 100644
--- a/lib/sendgrid.js
+++ b/lib/sendgrid.js
@@ -3,6 +3,7 @@
var package_json = require('./../package.json');
var _ = require('lodash');
var request = require('request');
+var smtpapi_lib = require('smtpapi');
var Email = require('./email');
var Sendgrid = function(api_user, api_key, options) {
@@ -103,6 +104,7 @@ var Sendgrid = function(api_user, api_key, options) {
*/
this.version = package_json.version;
this.Email = Email;
+ this.smtpapi = smtpapi_lib;
this.api_user = api_user;
this.api_key = api_key;
this.send = send;