Sends a simple email as the script runner.
class MailApp method .sendEmail()
MailApp is the Apps Script service.
.sendEmail() is the method name you will see after a dot in your code.
What it does
Why it's used
- Quick alerts when you do not need full Gmail thread handling.
- Simple script-finished emails from triggers.
Common errors
- Forgetting parentheses on sendEmail. Write MailApp.sendEmail(), not MailApp.sendEmail or sendEmail by itself.
- Skipping dots between chained calls. Each step needs a dot, like MailApp.sendEmail().
- Adding spaces where they do not belong. Write MailApp.sendEmail(), not MailApp .sendEmail(), MailApp.sendEmail (), or MailApp . sendEmail().
- Wrong capitalization. Use MailApp and sendEmail, not mailapp or sendemail.
2 Snippets using this methods
Explore
Related methods
-
.getRemainingDailyQuota()
Returns how many emails the script can still send today.
More Apps Script
3 Better Sheets tutorials
Automate Emails
Related blog posts
Written guides about MailApp.sendEmail().
Simply Email Yourself From a Google Sheet
I wanted to share with you one of the simplest apps scripts that has immense power. Email! You can email others, but you can also email yourself.
Read post →Email Yourself a Cell from a Google Sheet, Every Day
I'll show you how to email yourself one single cell data. That's one sheet, one cell, one email every single day.
Read post →How to Send Google Forms Entries Automatically with Apps Script
Google Forms provides basic email notifications for form submissions, but enhancing these notifications with detailed summaries can significantly improve productivity and response management.
Read post →