This commit is contained in:
Ben Ramey
2014-03-22 17:58:56 -05:00
parent fb212c514f
commit d1de555169

View File

@@ -41,13 +41,22 @@ module.exports = {
});
var inviteeEmails = [];
for (var i in values.invitees) {
inviteeEmails.push(i.email);
var invitee = values.invitees[i];
var emailStr = invitee.name + " <" + invitee.email + ">";
inviteeEmails.push(emailStr);
}
var options = {
from: values.creatorName + " <" + values.creatorEmail + ">",
to: inviteeEmails
to: inviteeEmails.join(","),
subject: "A lunch run!",
text: "You've been invited to a lunch run!"
};
console.log(options);
transport.sendMail(options, function(err, response) {
if (err) {
console.log(err);
@@ -60,5 +69,4 @@ module.exports = {
next();
},
};