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

Sends an email from the user's Gmail account.

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.

Explore

Related methods

Better Sheets tutorials

Automated Project Management in Google Sheets

Automated Project Management in Google Sheets

Create automatic notifications when a project is assigned, a project nee...
Automate Form Response to Confirmation Email

Automate Form Response to Confirmation Email

Create an email automatically when someone fills out a google form. incl...
Can I get alerted when a tab name is changed?

Can I get alerted when a tab name is changed?

Find out in this quick experiment if a tab name can be alerted to the ow...
Create an Automated Task List

Create an Automated Task List

I've created simple automations to make an awesome automatic task list. ...
Email Certain Department Based on Google Form Entries

Email Certain Department Based on Google Form Entries

Message a certain department when google form is submitted.
How To Send Two Emails in Same Trigger

How To Send Two Emails in Same Trigger

Without having to create two functions and two triggers you can combine ...
I Created an Automatic Emailer

I Created an Automatic Emailer

While creating SheetOps, a new product, I came up with this idea of an a...
Proof of Life

Proof of Life

Create a script that sends an email to ask for proof of life every month...
Send a Button from Google Sheets in an Email

Send a Button from Google Sheets in an Email

quick fun video to show you how to add a button to emails when you send ...

Related blog posts

Written guides about GmailApp.sendEmail().

Browse the blog