summaryrefslogtreecommitdiffstats
path: root/lib/sendgrid.js
diff options
context:
space:
mode:
authorDavid Tomberlin <david.tomberlin@sendgrid.com>2012-01-26 11:03:29 -0800
committerDavid Tomberlin <david.tomberlin@sendgrid.com>2012-01-26 11:05:52 -0800
commit78ab5df68cd722b1b7894133021644722a7d7c7c (patch)
tree5181a8d98bb00ce7fc65f8df1128e390f6beee1c /lib/sendgrid.js
parent3dc338de413f0789ad03569c8b58f417f1457d4d (diff)
downloadsendgrid-nodejs-78ab5df68cd722b1b7894133021644722a7d7c7c.zip
sendgrid-nodejs-78ab5df68cd722b1b7894133021644722a7d7c7c.tar.gz
sendgrid-nodejs-78ab5df68cd722b1b7894133021644722a7d7c7c.tar.bz2
fixed some test
Diffstat (limited to 'lib/sendgrid.js')
-rw-r--r--lib/sendgrid.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sendgrid.js b/lib/sendgrid.js
index 0a8a0a9..870bd7b 100644
--- a/lib/sendgrid.js
+++ b/lib/sendgrid.js
@@ -186,8 +186,8 @@ SendGrid.prototype.getMultipartData = function(email, boundary) {
data.push(new Buffer(encodeField(boundary, k, v)));
});
- _(email.files).each(function(filepath, filename) {
- data.push(encodeFile(boundary, mime.lookup(filepath), 'files[' + filename + ']', path.basename(filepath)));
+ _(email.files).each(function(file) {
+ data.push(encodeFile(boundary, file.contentType, 'files[' + file.filename + ']', file.filename));
data.push(new Buffer(email.file_data[filename]));
data.push(new Buffer('\r\n'));
});