I'm using the following code to send emails from a Google Sheets spreadsheet.
function email(){
var rng = SpreadsheetApp.getActiveSheet().getActiveRange()
var email = rng.getValues(); GmailApp.sendEmail(email[0][0], email[1][0], email[2][0]);
}
The 3 selected cells contain email address: email[0][0]
, subject: email[1][0]
, and message body: email[2][0]
.
The code works well but I would like the message body to be built up from multiple cells. So that for example cells [2][0], [3][0], [4][0]
will all be contained within the message body.