When I ask the script to send email as HTML everything is all in one line. If I do text only, each line is separated. Is there a way to separate each line of the responses?
function SendGoogleForm(e)
{
try
{
var email = "ma*******@email.com"
var subject = "";
var s = SpreadsheetApp.getActiveSheet();
var columns = s.getRange(1,1,1,s.getLastColumn()).getValues()[0];
var message = "";
for ( var keys in columns ) {
var key = columns[keys];
if ( e.namedValues[key] && (e.namedValues[key] != "") ) {
message += '<strong>' + key + '</strong>' + ' --> '+ e.namedValues[key] + "\n\n";
if (key === "Location")
subject += e.namedValues[key] + "";
}
}
GmailApp.sendEmail(email, subject, "", { htmlBody: message});
} catch (e) {
Logger.log(e.toString());
}
}