Reputation: 17
I'm writing my first project in Google Apps Script to send emails after parsing spreadsheet data. I need to fill <?=nameList?>
with a list of names, each on it's own line. I build the string with these lines inside a loop:
nameList = nameList.concat(finalName)
nameList = nameList.concat("\r\n")
The logs show a correctly formatted string:
[17-08-19 14:59:15:636 PDT] Former member string: a Monster
b Monster
d Monster
f Monster
g Monster
But in the actual email they appear:
a Monster b Monster d Monster f Monster g Monster
This thread did not solve the issue.
Upvotes: 0
Views: 196
Reputation: 3355
You can use htmlBody parameter.
MailApp.sendEmail({
to: "[email protected]",
subject: "Test",
htmlBody:nameList
})
Upvotes: 0