Sending e-mails using the MailApp service

The sendEmail function is able to send e-mails with prefixed messages. Remember to replace e-mail ID and message text. This service is mainly used to send e-mails with limited methods (only sendEmail and getRemainingDailyQuota), and it cannot access your Gmail account. You can use the GmailApp class for more methods:

function sendEmail(){
  var to = "[[reciever email id]]";
  var message = "[[message]]\n";

  MailApp.sendEmail(to, "Chapter 3", message);
}

Get Learning Google Apps Script now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.