Sends an email from the user's Gmail account.
class GmailApp method .sendEmail()
GmailApp 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
- Email a finished report or alert straight from a spreadsheet button.
- Notify the team when a trigger spots a threshold breach.
Common errors
- Forgetting parentheses on sendEmail. Write GmailApp.sendEmail(), not GmailApp.sendEmail or sendEmail by itself.
- Skipping dots between chained calls. Each step needs a dot, like GmailApp.search('label:inbox').sendEmail().
- Adding spaces where they do not belong. Write GmailApp.sendEmail(), not GmailApp .sendEmail(), GmailApp.sendEmail (), or GmailApp . sendEmail().
- Wrong capitalization. Use GmailApp and sendEmail, not gmailapp or sendemail.
2 Snippets using this methods
Explore
Related methods
-
.getAliases()
Returns the email addresses the user can send from.
-
.createLabel()
Creates a new Gmail label.
-
.createDraft()
Creates a draft email without sending it.
-
.getUserLabelByName()
Finds a Gmail label by its name.
-
.search()
Finds Gmail threads that match a search query.
More Apps Script
2 Better Sheets tutorials
Automated Project Management in Google Sheets
Automate Form Response to Confirmation Email
Related blog posts
Written guides about GmailApp.sendEmail().
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 →Automated Project Management in Google Sheets
When you have multiple people working on multiple tasks, and you want everyone to be on the page, what do you do? You can use a Google Sheet. But managing projects can be an intimidating task in Google Sheets. It's a lot of data entry, right? Especially when you have multiple people working on different tasks with different statuses across different projects. Data entry for multiple projects, with different people, tasks, and statuses – it gets messy fast! I'm no stranger to these issues...
Read post →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 →