Where did `array` come from? Should that be `data.emails`?

Node now has `array.foreach(function(item) {})` for iteration - we've started preferring that over `for in`