hoodie-plugins-manager
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -1,2 +0,3 @@ | ||
var nodemailer = require('nodemailer'); | ||
var nodemailer = require('nodemailer'), | ||
dataurl = require('dataurl'); | ||
@@ -41,2 +42,16 @@ | ||
} | ||
if (email.attachments) { | ||
email.attachments = email.attachments.map(function (att) { | ||
// strip filePath properties from attachments | ||
delete att.filePath; | ||
// parse dataURI properties | ||
if (att.dataURI) { | ||
var parsed = dataurl.parse(att.dataURI); | ||
att.contents = parsed.data; | ||
att.contentType = parsed.mimetype; | ||
delete att.dataURI; | ||
} | ||
return att; | ||
}); | ||
} | ||
return transport.sendMail(email, callback); | ||
@@ -43,0 +58,0 @@ }, |
{ | ||
"name": "hoodie-plugins-manager", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Run and dispatch events to Hoodie plugin server extensions", | ||
@@ -10,3 +10,4 @@ "dependencies": { | ||
"underscore": "1.5.1", | ||
"nodemailer": "0.5.2" | ||
"nodemailer": "0.5.2", | ||
"dataurl": "0.1.0" | ||
}, | ||
@@ -13,0 +14,0 @@ "devDependencies": { |
34446
957
6
+ Addeddataurl@0.1.0
+ Addeddataurl@0.1.0(transitive)