I'm trying to import a column into Google Sheets, and then send it via an email.
However, it's currently putting each cell in the column on the same line in the email, separated by a comma.
function sendEmails() {
var emails = ['example@example','example2@example.com'];
// Get Message
var messageContents = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Email").getRange("H3:H20").getValues();//Double quotes added by editor. See edit history
//Send Emails
var subject = "Example";
MailApp.sendEmail(emails, subject, messageContents);
}
Is there any way to get it to put each cell on a new line, as they are currently in the spreadsheet.
Thanks
messageContents.join("\n")
- TheMaster