public class Gmail.Users.Messages extends Object
Modifier and Type | Class and Description |
---|---|
class |
Gmail.Users.Messages.Attachments
The "attachments" collection of methods.
|
class |
Gmail.Users.Messages.BatchDelete |
class |
Gmail.Users.Messages.BatchModify |
class |
Gmail.Users.Messages.Delete |
class |
Gmail.Users.Messages.Get |
class |
Gmail.Users.Messages.GmailImport |
class |
Gmail.Users.Messages.Insert |
class |
Gmail.Users.Messages.List |
class |
Gmail.Users.Messages.Modify |
class |
Gmail.Users.Messages.Send |
class |
Gmail.Users.Messages.Trash |
class |
Gmail.Users.Messages.Untrash |
Constructor and Description |
---|
Messages() |
Modifier and Type | Method and Description |
---|---|
Gmail.Users.Messages.Attachments |
attachments()
An accessor for creating requests from the Attachments collection.
|
Gmail.Users.Messages.BatchDelete |
batchDelete(String userId,
BatchDeleteMessagesRequest content)
Deletes many messages by message ID.
|
Gmail.Users.Messages.BatchModify |
batchModify(String userId,
BatchModifyMessagesRequest content)
Modifies the labels on the specified messages.
|
Gmail.Users.Messages.Delete |
delete(String userId,
String id)
Immediately and permanently deletes the specified message.
|
Gmail.Users.Messages.Get |
get(String userId,
String id)
Gets the specified message.
|
Gmail.Users.Messages.GmailImport |
gmailImport(String userId,
Message content)
Imports a message into only this user's mailbox, with standard email delivery scanning and
classification similar to receiving via SMTP.
|
Gmail.Users.Messages.GmailImport |
gmailImport(String userId,
Message content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Imports a message into only this user's mailbox, with standard email delivery scanning and
classification similar to receiving via SMTP.
|
Gmail.Users.Messages.Insert |
insert(String userId,
Message content)
Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most
scanning and classification.
|
Gmail.Users.Messages.Insert |
insert(String userId,
Message content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most
scanning and classification.
|
Gmail.Users.Messages.List |
list(String userId)
Lists the messages in the user's mailbox.
|
Gmail.Users.Messages.Modify |
modify(String userId,
String id,
ModifyMessageRequest content)
Modifies the labels on the specified message.
|
Gmail.Users.Messages.Send |
send(String userId,
Message content)
Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers.
|
Gmail.Users.Messages.Send |
send(String userId,
Message content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers.
|
Gmail.Users.Messages.Trash |
trash(String userId,
String id)
Moves the specified message to the trash.
|
Gmail.Users.Messages.Untrash |
untrash(String userId,
String id)
Removes the specified message from the trash.
|
public Gmail.Users.Messages.BatchDelete batchDelete(String userId, BatchDeleteMessagesRequest content) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]content
- the BatchDeleteMessagesRequest
IOException
public Gmail.Users.Messages.BatchModify batchModify(String userId, BatchModifyMessagesRequest content) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]content
- the BatchModifyMessagesRequest
IOException
public Gmail.Users.Messages.Delete delete(String userId, String id) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]id
- The ID of the message to delete.IOException
public Gmail.Users.Messages.Get get(String userId, String id) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]id
- The ID of the message to retrieve. This ID is usually retrieved using `messages.list`. The ID is
also contained in the result when a message is inserted (`messages.insert`) or imported
(`messages.import`).IOException
public Gmail.Users.Messages.GmailImport gmailImport(String userId, Message content) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]content
- the Message
IOException
public Gmail.Users.Messages.GmailImport gmailImport(String userId, Message content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]content
- the Message
media metadata or null
if nonemediaContent
- The media HTTP content.IOException
- if the initialization of the request failspublic Gmail.Users.Messages.Insert insert(String userId, Message content) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]content
- the Message
IOException
public Gmail.Users.Messages.Insert insert(String userId, Message content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]content
- the Message
media metadata or null
if nonemediaContent
- The media HTTP content.IOException
- if the initialization of the request failspublic Gmail.Users.Messages.List list(String userId) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]IOException
public Gmail.Users.Messages.Modify modify(String userId, String id, ModifyMessageRequest content) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]id
- The ID of the message to modify.content
- the ModifyMessageRequest
IOException
public Gmail.Users.Messages.Send send(String userId, Message content) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]content
- the Message
IOException
public Gmail.Users.Messages.Send send(String userId, Message content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]content
- the Message
media metadata or null
if nonemediaContent
- The media HTTP content.IOException
- if the initialization of the request failspublic Gmail.Users.Messages.Trash trash(String userId, String id) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]id
- The ID of the message to Trash.IOException
public Gmail.Users.Messages.Untrash untrash(String userId, String id) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]id
- The ID of the message to remove from Trash.IOException
public Gmail.Users.Messages.Attachments attachments()
The typical use is:
Gmail gmail = new Gmail(...);
Gmail.Attachments.List request = gmail.attachments().list(parameters ...)
Copyright © 2011–2024 Google. All rights reserved.