You sending a single mail to multiple recipients. The render function is only called once.
You have two possibilities:
var promises = [];
for (var i = 0; i < fromUser.length; i++) {
promises.push(new Promise(function(resolve, reject) {
mail.sendMail({
from: 'Website Support <help@domain.com>',
to: fromUser[i].email,
subject: 'Seller Matched',
template: 'SellerMatch',
context: {
user: fromUser[i].Name,
username: offer.owner.username,
OfferName: offer.name,
category: offer.category
}
}, function(err, info) {
if (err) {
reject(err)
} else {
resolve(info)
}
});
}));
}
Promise.all(promises).then(function(infos) { cb(null, infos) }, function(err) { cb(err) });
I use Promises to collect all callbacks. If you can't use ES2015 you need to polyfill them or try an other solution.
Disadvantages: "To" contains only a single recipient. In error case you only get the first error and don't know which mails are sended and which not (and why).
I never tried this because it doesn't work on every client.