Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
Google_Service_Gmail_UsersMessages_Resource Class Reference

The "messages" collection of methods. More...

Inheritance diagram for Google_Service_Gmail_UsersMessages_Resource:
Google_Service_Resource

Public Member Functions

 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 delete ($userId, $id, $optParams=array())
 Immediately and permanently deletes the specified message.
 
 get ($userId, $id, $optParams=array())
 Gets the specified message.
 
 import ($userId, Google_Service_Gmail_Message $postBody, $optParams=array())
 Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP.
 
 insert ($userId, Google_Service_Gmail_Message $postBody, $optParams=array())
 Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification.
 
 listUsersMessages ($userId, $optParams=array())
 Lists the messages in the user's mailbox.
 
 modify ($userId, $id, Google_Service_Gmail_ModifyMessageRequest $postBody, $optParams=array())
 Modifies the labels on the specified message.
 
 send ($userId, Google_Service_Gmail_Message $postBody, $optParams=array())
 Sends the specified message to the recipients in the To, Cc, and Bcc headers.
 
 trash ($userId, $id, $optParams=array())
 Moves the specified message to the trash.
 
 untrash ($userId, $id, $optParams=array())
 Removes the specified message from the trash.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "messages" collection of methods.

Typical usage is: $gmailService = new Google_Service_Gmail(...); $messages = $gmailService->messages;

Member Function Documentation

◆ call()

Google_Service_Resource::call ( $name,
$arguments,
$expected_class = null )
inherited

TODO: This function needs simplifying.

Parameters
$name
$arguments
$expected_class- optional, the expected class name
Return values
Google_Http_Request|expected_class
Exceptions
Google_Exception

◆ delete()

Google_Service_Gmail_UsersMessages_Resource::delete ( $userId,
$id,
$optParams = array() )

Immediately and permanently deletes the specified message.

This operation cannot be undone. Prefer messages.trash instead. (messages.delete)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
string$idThe ID of the message to delete.
array$optParamsOptional parameters.

◆ get()

Google_Service_Gmail_UsersMessages_Resource::get ( $userId,
$id,
$optParams = array() )

Gets the specified message.

(messages.get)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
string$idThe ID of the message to retrieve.
array$optParamsOptional parameters.

@opt_param string metadataHeaders When given and format is METADATA, only include headers specified. @opt_param string format The format to return the message in.

Return values
Google_Service_Gmail_Message

◆ import()

Google_Service_Gmail_UsersMessages_Resource::import ( $userId,
Google_Service_Gmail_Message $postBody,
$optParams = array() )

Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP.

Does not send a message. (messages.import)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
Google_Message$postBody
array$optParamsOptional parameters.

@opt_param bool deleted Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts. @opt_param bool processForCalendar Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. @opt_param string internalDateSource Source for Gmail's internal date of the message. @opt_param bool neverMarkSpam Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.

Return values
Google_Service_Gmail_Message

◆ insert()

Google_Service_Gmail_UsersMessages_Resource::insert ( $userId,
Google_Service_Gmail_Message $postBody,
$optParams = array() )

Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification.

Does not send a message. (messages.insert)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
Google_Message$postBody
array$optParamsOptional parameters.

@opt_param bool deleted Mark the email as permanently deleted (not TRASH) and only visible in Google Apps Vault to a Vault administrator. Only used for Google Apps for Work accounts. @opt_param string internalDateSource Source for Gmail's internal date of the message.

Return values
Google_Service_Gmail_Message

◆ listUsersMessages()

Google_Service_Gmail_UsersMessages_Resource::listUsersMessages ( $userId,
$optParams = array() )

Lists the messages in the user's mailbox.

(messages.listUsersMessages)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
array$optParamsOptional parameters.

@opt_param string maxResults Maximum number of messages to return. @opt_param string q Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". @opt_param string pageToken Page token to retrieve a specific page of results in the list. @opt_param bool includeSpamTrash Include messages from SPAM and TRASH in the results. @opt_param string labelIds Only return messages with labels that match all of the specified label IDs.

Return values
Google_Service_Gmail_ListMessagesResponse

◆ modify()

Google_Service_Gmail_UsersMessages_Resource::modify ( $userId,
$id,
Google_Service_Gmail_ModifyMessageRequest $postBody,
$optParams = array() )

Modifies the labels on the specified message.

(messages.modify)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
string$idThe ID of the message to modify.
Google_ModifyMessageRequest$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Gmail_Message

◆ send()

Google_Service_Gmail_UsersMessages_Resource::send ( $userId,
Google_Service_Gmail_Message $postBody,
$optParams = array() )

Sends the specified message to the recipients in the To, Cc, and Bcc headers.

(messages.send)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
Google_Message$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Gmail_Message

◆ trash()

Google_Service_Gmail_UsersMessages_Resource::trash ( $userId,
$id,
$optParams = array() )

Moves the specified message to the trash.

(messages.trash)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
string$idThe ID of the message to Trash.
array$optParamsOptional parameters.
Return values
Google_Service_Gmail_Message

◆ untrash()

Google_Service_Gmail_UsersMessages_Resource::untrash ( $userId,
$id,
$optParams = array() )

Removes the specified message from the trash.

(messages.untrash)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
string$idThe ID of the message to remove from Trash.
array$optParamsOptional parameters.
Return values
Google_Service_Gmail_Message

The documentation for this class was generated from the following file: