Mail Service

  • The Mail service enables scripts to send emails on behalf of a user without accessing their Gmail account, focusing solely on sending functionality.

  • It features the MailApp class with methods to send emails and check the remaining daily email quota.

  • MailApp offers various sendEmail methods to send emails with different levels of customization, including specifying recipients, subject, body, and optional arguments.

Mail

This service allows scripts to send email on a user's behalf. See also Gmail Service. Unlike Gmail Service, Mail Service's sole purpose is sending email; it cannot access a user's Gmail account.

Classes

NameBrief description
MailApp Sends email.

MailApp

Methods

MethodReturn typeBrief description
getRemainingDailyQuota() IntegerReturns the number of recipients you can send emails to for the rest of the day.
sendEmail(message) voidSends an email message.
sendEmail(recipient, subject, body) voidSends an email message.
sendEmail(recipient, subject, body, options) voidSends an email message with optional arguments.
sendEmail(to, replyTo, subject, body) voidSends an email message.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年12月02日 UTC.