The "messages" collection of methods.
More...
|
| 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.
|
|
|
| convertToArrayAndStripNulls ($o) |
|
The "messages" collection of methods.
Typical usage is: $gmailService = new Google_Service_Gmail(...); $messages = $gmailService->messages;
◆ 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
-
◆ 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 | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
string | $id | The ID of the message to delete. |
array | $optParams | Optional parameters. |
◆ get()
Google_Service_Gmail_UsersMessages_Resource::get |
( |
| $userId, |
|
|
| $id, |
|
|
| $optParams = array() ) |
Gets the specified message.
(messages.get)
- Parameters
-
string | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
string | $id | The ID of the message to retrieve. |
array | $optParams | Optional 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
-
◆ import()
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 | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
Google_Message | $postBody | |
array | $optParams | Optional 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
-
◆ insert()
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 | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
Google_Message | $postBody | |
array | $optParams | Optional 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
-
◆ listUsersMessages()
Google_Service_Gmail_UsersMessages_Resource::listUsersMessages |
( |
| $userId, |
|
|
| $optParams = array() ) |
Lists the messages in the user's mailbox.
(messages.listUsersMessages)
- Parameters
-
string | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
array | $optParams | Optional 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
-
◆ modify()
Modifies the labels on the specified message.
(messages.modify)
- Parameters
-
string | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
string | $id | The ID of the message to modify. |
Google_ModifyMessageRequest | $postBody | |
array | $optParams | Optional parameters. |
- Return values
-
◆ send()
Sends the specified message to the recipients in the To, Cc, and Bcc headers.
(messages.send)
- Parameters
-
string | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
Google_Message | $postBody | |
array | $optParams | Optional parameters. |
- Return values
-
◆ trash()
Google_Service_Gmail_UsersMessages_Resource::trash |
( |
| $userId, |
|
|
| $id, |
|
|
| $optParams = array() ) |
Moves the specified message to the trash.
(messages.trash)
- Parameters
-
string | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
string | $id | The ID of the message to Trash. |
array | $optParams | Optional parameters. |
- Return values
-
◆ untrash()
Google_Service_Gmail_UsersMessages_Resource::untrash |
( |
| $userId, |
|
|
| $id, |
|
|
| $optParams = array() ) |
Removes the specified message from the trash.
(messages.untrash)
- Parameters
-
string | $userId | The user's email address. The special value me can be used to indicate the authenticated user. |
string | $id | The ID of the message to remove from Trash. |
array | $optParams | Optional parameters. |
- Return values
-
The documentation for this class was generated from the following file:
- lib/google/src/Google/Service/Gmail.php