Send an email using email addresses from a column in Google sheets all email address at once custom messagein row - Stack Overflow

PHOTO EMBED

Mon Oct 03 2022 04:49:31 GMT+0000 (Coordinated Universal Time)

Saved by @ash1i #javascript

function SendEmail(){
  var emailRange = SpreadsheetApp.getActiveSpreadsheet()
    .getSheetByName("HLP REQUESTS").getRange("K:K");

  var emailAddress = emailRange.getValues()
    .flat()           // convert a 2d array into a flat array
    .filter(String)   // remove empty elements from the array
    .pop();           // get the last element from the array

  var message = 'A request has been submitted for professional learning related to an HLP you champion.  Please check the Design Team Notes document in case follow-up is required.';
  var subject = 'HLP Request for Professional Learning';

  MailApp.sendEmail(emailAddress, subject, message);
}
content_copyCOPY

https://stackoverflow.com/questions/72275483/send-an-email-using-email-addresses-from-a-column-in-google-sheets