diff options
author | scottmotte <scott@scottmotte.com> | 2013-07-22 19:44:39 +0000 |
---|---|---|
committer | scottmotte <scott@scottmotte.com> | 2013-07-22 20:35:27 +0000 |
commit | 43ac2f7ba76754580c96dae840d6d15c225b717f (patch) | |
tree | 54862b9b0b75f92b8033638a6b67acce845423b4 /lib/sendgrid.js | |
parent | 21cbabbafce4e9c6ba773bb7ee9e7ae5cdf493da (diff) | |
download | sendgrid-nodejs-43ac2f7ba76754580c96dae840d6d15c225b717f.zip sendgrid-nodejs-43ac2f7ba76754580c96dae840d6d15c225b717f.tar.gz sendgrid-nodejs-43ac2f7ba76754580c96dae840d6d15c225b717f.tar.bz2 |
Simplify's filehandler a bit to move away from step.js
Diffstat (limited to 'lib/sendgrid.js')
-rw-r--r-- | lib/sendgrid.js | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/sendgrid.js b/lib/sendgrid.js index 68752a9..991f9e4 100644 --- a/lib/sendgrid.js +++ b/lib/sendgrid.js @@ -3,8 +3,9 @@ var package_json = require('./../package.json'); var nodemailer = require('nodemailer'); var request = require('request'); - -var Email = require('./email'); +var MailComposer = require('mailcomposer').MailComposer; +var mailcomposer = new MailComposer(); +var Email = require('./email'); /* @@ -88,17 +89,7 @@ SendGrid.prototype.web = function(email, callback) { } } - if (email.hasFiles()) { - email.processFiles(function(success, message) { - if (success) { - send_web(); - } else { - cb(false, message); - } - }); - } else { - send_web(); - } + send_web(); }; /* |