class Gmail extends Service (View source)

Service definition for Gmail (v1).

The Gmail API lets you view and manage Gmail mailbox data like threads, messages, and labels.

For more information about this service, see the API Documentation

Constants

MAIL_GOOGLE_COM

Read, compose, send, and permanently delete all your email from Gmail.

GMAIL_ADDONS_CURRENT_ACTION_COMPOSE

Manage drafts and send emails when you interact with the add-on.

GMAIL_ADDONS_CURRENT_MESSAGE_ACTION

View your email messages when you interact with the add-on.

GMAIL_ADDONS_CURRENT_MESSAGE_METADATA

View your email message metadata when the add-on is running.

GMAIL_ADDONS_CURRENT_MESSAGE_READONLY

View your email messages when the add-on is running.

GMAIL_COMPOSE

Manage drafts and send emails.

GMAIL_INSERT

Add emails into your Gmail mailbox.

GMAIL_LABELS

See and edit your email labels.

GMAIL_METADATA

View your email message metadata such as labels and headers, but not the email body.

GMAIL_MODIFY

Read, compose, and send emails from your Gmail account.

GMAIL_READONLY

View your email messages and settings.

GMAIL_SEND

Send email on your behalf.

GMAIL_SETTINGS_BASIC

See, edit, create, or change your email settings and filters in Gmail.

GMAIL_SETTINGS_SHARING

Manage your sensitive mail settings, including who can manage your mail.

Properties

$users
$users_drafts
$users_history
$users_labels
$users_messages
$users_messages_attachments
$users_settings
$users_settings_cse_identities
$users_settings_cse_keypairs
$users_settings_delegates
$users_settings_filters
$users_settings_forwardingAddresses
$users_settings_sendAs
$users_settings_sendAs_smimeInfo
$users_threads
$rootUrlTemplate

Methods

__construct(Client|array $clientOrConfig = [], string $rootUrl = null)

Constructs the internal representation of the Gmail service.

Details

__construct(Client|array $clientOrConfig = [], string $rootUrl = null)

Constructs the internal representation of the Gmail service.

Parameters

Client|array $clientOrConfig

The client used to deliver requests, or a config array to pass to a new Client instance.

string $rootUrl

The root URL used for requests to the service.