var listtodisplay = (function () {
// listitems is an array of string to be listed
var string = “”;
lisitems.forEach(function (item) {
string += (‘<br>• ‘ + item.toString());
});
return string;
})();
concatenate the above string listtodisplay to the Body of the email.