google-apps-script Google sheets MailApp A basic MailApp Example

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

MailApp is the api from Google App Script that can be used to send mail

function sendEmails() {

  var subject = "A subject for your new app!";
  var message = "And this is the very first message"
  var recipientEmail = "[email protected]";

  MailApp.sendEmail(recipientEmail, subject, message);
}  

The MailApp Class is limited to quotas based on your Google Account:

  • Consumer user (ie, personal Gmail account): 100 recipients/day
  • Google Apps (legacy) customer: 100 recipients/day
  • GSuite (basic/Gov/Edu/Business): 1500 recipients/day

You can check your email quota within MailApp

function checkQuota() {
  Logger.log(MailApp.getRemainingDailyQuota());
}


Got any google-apps-script Question?