blob: 7e8e136023893824b7c00127d5d0a13c5e7f58cb [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="gmail_v1.html">Gmail API</a> . <a href="gmail_v1.users.html">users</a> . <a href="gmail_v1.users.messages.html">messages</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="gmail_v1.users.messages.attachments.html">attachments()</a></code>
79</p>
80<p class="firstline">Returns the attachments Resource.</p>
81
82<p class="toc_element">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070083 <code><a href="#batchDelete">batchDelete(userId, body)</a></code></p>
84<p class="firstline">Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.</p>
85<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080086 <code><a href="#batchModify">batchModify(userId, body)</a></code></p>
87<p class="firstline">Modifies the labels on the specified messages.</p>
88<p class="toc_element">
Craig Citro065b5302014-08-14 00:47:23 -070089 <code><a href="#delete">delete(userId, id)</a></code></p>
90<p class="firstline">Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.</p>
91<p class="toc_element">
Craig Citro0e5b9bf2014-10-15 10:26:14 -070092 <code><a href="#get">get(userId, id, format=None, metadataHeaders=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070093<p class="firstline">Gets the specified message.</p>
94<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080095 <code><a href="#import_">import_(userId, body=None, media_body=None, internalDateSource=None, neverMarkSpam=None, media_mime_type=None, deleted=None, processForCalendar=None)</a></code></p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070096<p class="firstline">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.</p>
Craig Citro065b5302014-08-14 00:47:23 -070097<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080098 <code><a href="#insert">insert(userId, body=None, media_body=None, internalDateSource=None, media_mime_type=None, deleted=None)</a></code></p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070099<p class="firstline">Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700100<p class="toc_element">
101 <code><a href="#list">list(userId, labelIds=None, q=None, pageToken=None, maxResults=None, includeSpamTrash=None)</a></code></p>
102<p class="firstline">Lists the messages in the user's mailbox.</p>
103<p class="toc_element">
104 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
105<p class="firstline">Retrieves the next page of results.</p>
106<p class="toc_element">
107 <code><a href="#modify">modify(userId, id, body)</a></code></p>
108<p class="firstline">Modifies the labels on the specified message.</p>
109<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800110 <code><a href="#send">send(userId, body=None, media_body=None, media_mime_type=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700111<p class="firstline">Sends the specified message to the recipients in the To, Cc, and Bcc headers.</p>
112<p class="toc_element">
113 <code><a href="#trash">trash(userId, id)</a></code></p>
114<p class="firstline">Moves the specified message to the trash.</p>
115<p class="toc_element">
116 <code><a href="#untrash">untrash(userId, id)</a></code></p>
117<p class="firstline">Removes the specified message from the trash.</p>
118<h3>Method Details</h3>
119<div class="method">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700120 <code class="details" id="batchDelete">batchDelete(userId, body)</code>
121 <pre>Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.
122
123Args:
124 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
125 body: object, The request body. (required)
126 The object takes the form of:
127
128{
129 "ids": [ # The IDs of the messages to delete.
130 "A String",
131 ],
132 }
133
134</pre>
135</div>
136
137<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800138 <code class="details" id="batchModify">batchModify(userId, body)</code>
139 <pre>Modifies the labels on the specified messages.
140
141Args:
142 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
143 body: object, The request body. (required)
144 The object takes the form of:
145
146{
147 "removeLabelIds": [ # A list of label IDs to remove from messages.
148 "A String",
149 ],
150 "ids": [ # The IDs of the messages to modify. There is a limit of 1000 ids per request.
151 "A String",
152 ],
153 "addLabelIds": [ # A list of label IDs to add to messages.
154 "A String",
155 ],
156 }
157
158</pre>
159</div>
160
161<div class="method">
Craig Citro065b5302014-08-14 00:47:23 -0700162 <code class="details" id="delete">delete(userId, id)</code>
163 <pre>Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.
164
165Args:
166 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
167 id: string, The ID of the message to delete. (required)
168</pre>
169</div>
170
171<div class="method">
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700172 <code class="details" id="get">get(userId, id, format=None, metadataHeaders=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700173 <pre>Gets the specified message.
174
175Args:
176 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
177 id: string, The ID of the message to retrieve. (required)
178 format: string, The format to return the message in.
179 Allowed values
180 full -
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700181 metadata -
Craig Citro065b5302014-08-14 00:47:23 -0700182 minimal -
183 raw -
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700184 metadataHeaders: string, When given and format is METADATA, only include headers specified. (repeated)
Craig Citro065b5302014-08-14 00:47:23 -0700185
186Returns:
187 An object of the form:
188
189 { # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700190 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700191 "historyId": "A String", # The ID of the last history record that modified this message.
192 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
193 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800194 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700195 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800196 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700197 },
198 "mimeType": "A String", # The MIME type of the message part.
199 "partId": "A String", # The immutable ID of the message part.
200 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
201 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
202 {
203 "name": "A String", # The name of the header before the : separator. For example, To.
204 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
205 },
206 ],
207 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
208 # Object with schema name: MessagePart
209 ],
210 },
211 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800212 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700213 "sizeEstimate": 42, # Estimated size in bytes of the message.
214 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
215 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700216 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700217 # - The Subject headers must match.
218 "labelIds": [ # List of IDs of labels applied to this message.
219 "A String",
220 ],
221 "id": "A String", # The immutable ID of the message.
222 }</pre>
223</div>
224
225<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800226 <code class="details" id="import_">import_(userId, body=None, media_body=None, internalDateSource=None, neverMarkSpam=None, media_mime_type=None, deleted=None, processForCalendar=None)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700227 <pre>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.
Craig Citro065b5302014-08-14 00:47:23 -0700228
229Args:
230 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
231 body: object, The request body.
232 The object takes the form of:
233
234{ # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700235 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700236 "historyId": "A String", # The ID of the last history record that modified this message.
237 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
238 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800239 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700240 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800241 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700242 },
243 "mimeType": "A String", # The MIME type of the message part.
244 "partId": "A String", # The immutable ID of the message part.
245 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
246 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
247 {
248 "name": "A String", # The name of the header before the : separator. For example, To.
249 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
250 },
251 ],
252 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
253 # Object with schema name: MessagePart
254 ],
255 },
256 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800257 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700258 "sizeEstimate": 42, # Estimated size in bytes of the message.
259 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
260 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700261 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700262 # - The Subject headers must match.
263 "labelIds": [ # List of IDs of labels applied to this message.
264 "A String",
265 ],
266 "id": "A String", # The immutable ID of the message.
267}
268
269 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700270 internalDateSource: string, Source for Gmail's internal date of the message.
271 Allowed values
272 dateHeader -
273 receivedTime -
Craig Citroe633be12015-03-02 13:40:36 -0800274 neverMarkSpam: boolean, Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800275 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400276 deleted: boolean, Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800277 processForCalendar: boolean, Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.
Craig Citro065b5302014-08-14 00:47:23 -0700278
279Returns:
280 An object of the form:
281
282 { # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700283 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700284 "historyId": "A String", # The ID of the last history record that modified this message.
285 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
286 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800287 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700288 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800289 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700290 },
291 "mimeType": "A String", # The MIME type of the message part.
292 "partId": "A String", # The immutable ID of the message part.
293 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
294 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
295 {
296 "name": "A String", # The name of the header before the : separator. For example, To.
297 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
298 },
299 ],
300 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
301 # Object with schema name: MessagePart
302 ],
303 },
304 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800305 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700306 "sizeEstimate": 42, # Estimated size in bytes of the message.
307 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
308 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700309 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700310 # - The Subject headers must match.
311 "labelIds": [ # List of IDs of labels applied to this message.
312 "A String",
313 ],
314 "id": "A String", # The immutable ID of the message.
315 }</pre>
316</div>
317
318<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800319 <code class="details" id="insert">insert(userId, body=None, media_body=None, internalDateSource=None, media_mime_type=None, deleted=None)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700320 <pre>Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.
Craig Citro065b5302014-08-14 00:47:23 -0700321
322Args:
323 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
324 body: object, The request body.
325 The object takes the form of:
326
327{ # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700328 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700329 "historyId": "A String", # The ID of the last history record that modified this message.
330 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
331 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800332 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700333 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800334 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700335 },
336 "mimeType": "A String", # The MIME type of the message part.
337 "partId": "A String", # The immutable ID of the message part.
338 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
339 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
340 {
341 "name": "A String", # The name of the header before the : separator. For example, To.
342 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
343 },
344 ],
345 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
346 # Object with schema name: MessagePart
347 ],
348 },
349 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800350 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700351 "sizeEstimate": 42, # Estimated size in bytes of the message.
352 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
353 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700354 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700355 # - The Subject headers must match.
356 "labelIds": [ # List of IDs of labels applied to this message.
357 "A String",
358 ],
359 "id": "A String", # The immutable ID of the message.
360}
361
362 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700363 internalDateSource: string, Source for Gmail's internal date of the message.
364 Allowed values
365 dateHeader -
366 receivedTime -
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800367 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400368 deleted: boolean, Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.
Craig Citro065b5302014-08-14 00:47:23 -0700369
370Returns:
371 An object of the form:
372
373 { # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700374 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700375 "historyId": "A String", # The ID of the last history record that modified this message.
376 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
377 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800378 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700379 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800380 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700381 },
382 "mimeType": "A String", # The MIME type of the message part.
383 "partId": "A String", # The immutable ID of the message part.
384 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
385 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
386 {
387 "name": "A String", # The name of the header before the : separator. For example, To.
388 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
389 },
390 ],
391 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
392 # Object with schema name: MessagePart
393 ],
394 },
395 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800396 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700397 "sizeEstimate": 42, # Estimated size in bytes of the message.
398 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
399 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700400 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700401 # - The Subject headers must match.
402 "labelIds": [ # List of IDs of labels applied to this message.
403 "A String",
404 ],
405 "id": "A String", # The immutable ID of the message.
406 }</pre>
407</div>
408
409<div class="method">
410 <code class="details" id="list">list(userId, labelIds=None, q=None, pageToken=None, maxResults=None, includeSpamTrash=None)</code>
411 <pre>Lists the messages in the user's mailbox.
412
413Args:
414 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
415 labelIds: string, Only return messages with labels that match all of the specified label IDs. (repeated)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400416 q: string, Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid:<somemsgid@example.com> is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.
Craig Citro065b5302014-08-14 00:47:23 -0700417 pageToken: string, Page token to retrieve a specific page of results in the list.
418 maxResults: integer, Maximum number of messages to return.
419 includeSpamTrash: boolean, Include messages from SPAM and TRASH in the results.
420
421Returns:
422 An object of the form:
423
424 {
425 "nextPageToken": "A String", # Token to retrieve the next page of results in the list.
426 "resultSizeEstimate": 42, # Estimated total number of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 "messages": [ # List of messages. Note that each message resource contains only an id and a threadId. Additional message details can be fetched using the messages.get method.
Craig Citro065b5302014-08-14 00:47:23 -0700428 { # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700429 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700430 "historyId": "A String", # The ID of the last history record that modified this message.
431 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
432 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800433 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700434 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800435 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700436 },
437 "mimeType": "A String", # The MIME type of the message part.
438 "partId": "A String", # The immutable ID of the message part.
439 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
440 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
441 {
442 "name": "A String", # The name of the header before the : separator. For example, To.
443 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
444 },
445 ],
446 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
447 # Object with schema name: MessagePart
448 ],
449 },
450 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800451 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700452 "sizeEstimate": 42, # Estimated size in bytes of the message.
453 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
454 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700455 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700456 # - The Subject headers must match.
457 "labelIds": [ # List of IDs of labels applied to this message.
458 "A String",
459 ],
460 "id": "A String", # The immutable ID of the message.
461 },
462 ],
463 }</pre>
464</div>
465
466<div class="method">
467 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
468 <pre>Retrieves the next page of results.
469
470Args:
471 previous_request: The request for the previous page. (required)
472 previous_response: The response from the request for the previous page. (required)
473
474Returns:
475 A request object that you can call 'execute()' on to request the next
476 page. Returns None if there are no more items in the collection.
477 </pre>
478</div>
479
480<div class="method">
481 <code class="details" id="modify">modify(userId, id, body)</code>
482 <pre>Modifies the labels on the specified message.
483
484Args:
485 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
486 id: string, The ID of the message to modify. (required)
487 body: object, The request body. (required)
488 The object takes the form of:
489
490{
491 "removeLabelIds": [ # A list IDs of labels to remove from this message.
492 "A String",
493 ],
494 "addLabelIds": [ # A list of IDs of labels to add to this message.
495 "A String",
496 ],
497 }
498
499
500Returns:
501 An object of the form:
502
503 { # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700504 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700505 "historyId": "A String", # The ID of the last history record that modified this message.
506 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
507 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800508 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700509 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800510 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700511 },
512 "mimeType": "A String", # The MIME type of the message part.
513 "partId": "A String", # The immutable ID of the message part.
514 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
515 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
516 {
517 "name": "A String", # The name of the header before the : separator. For example, To.
518 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
519 },
520 ],
521 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
522 # Object with schema name: MessagePart
523 ],
524 },
525 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800526 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700527 "sizeEstimate": 42, # Estimated size in bytes of the message.
528 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
529 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700530 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700531 # - The Subject headers must match.
532 "labelIds": [ # List of IDs of labels applied to this message.
533 "A String",
534 ],
535 "id": "A String", # The immutable ID of the message.
536 }</pre>
537</div>
538
539<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800540 <code class="details" id="send">send(userId, body=None, media_body=None, media_mime_type=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700541 <pre>Sends the specified message to the recipients in the To, Cc, and Bcc headers.
542
543Args:
544 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
545 body: object, The request body.
546 The object takes the form of:
547
548{ # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700549 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700550 "historyId": "A String", # The ID of the last history record that modified this message.
551 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
552 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800553 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700554 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800555 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700556 },
557 "mimeType": "A String", # The MIME type of the message part.
558 "partId": "A String", # The immutable ID of the message part.
559 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
560 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
561 {
562 "name": "A String", # The name of the header before the : separator. For example, To.
563 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
564 },
565 ],
566 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
567 # Object with schema name: MessagePart
568 ],
569 },
570 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800571 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700572 "sizeEstimate": 42, # Estimated size in bytes of the message.
573 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
574 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700575 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700576 # - The Subject headers must match.
577 "labelIds": [ # List of IDs of labels applied to this message.
578 "A String",
579 ],
580 "id": "A String", # The immutable ID of the message.
581}
582
583 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800584 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Craig Citro065b5302014-08-14 00:47:23 -0700585
586Returns:
587 An object of the form:
588
589 { # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700590 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700591 "historyId": "A String", # The ID of the last history record that modified this message.
592 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
593 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800594 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700595 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800596 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700597 },
598 "mimeType": "A String", # The MIME type of the message part.
599 "partId": "A String", # The immutable ID of the message part.
600 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
601 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
602 {
603 "name": "A String", # The name of the header before the : separator. For example, To.
604 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
605 },
606 ],
607 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
608 # Object with schema name: MessagePart
609 ],
610 },
611 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800612 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700613 "sizeEstimate": 42, # Estimated size in bytes of the message.
614 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
615 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700616 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700617 # - The Subject headers must match.
618 "labelIds": [ # List of IDs of labels applied to this message.
619 "A String",
620 ],
621 "id": "A String", # The immutable ID of the message.
622 }</pre>
623</div>
624
625<div class="method">
626 <code class="details" id="trash">trash(userId, id)</code>
627 <pre>Moves the specified message to the trash.
628
629Args:
630 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
631 id: string, The ID of the message to Trash. (required)
632
633Returns:
634 An object of the form:
635
636 { # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700637 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700638 "historyId": "A String", # The ID of the last history record that modified this message.
639 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
640 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800641 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700642 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800643 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700644 },
645 "mimeType": "A String", # The MIME type of the message part.
646 "partId": "A String", # The immutable ID of the message part.
647 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
648 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
649 {
650 "name": "A String", # The name of the header before the : separator. For example, To.
651 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
652 },
653 ],
654 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
655 # Object with schema name: MessagePart
656 ],
657 },
658 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800659 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700660 "sizeEstimate": 42, # Estimated size in bytes of the message.
661 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
662 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700663 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700664 # - The Subject headers must match.
665 "labelIds": [ # List of IDs of labels applied to this message.
666 "A String",
667 ],
668 "id": "A String", # The immutable ID of the message.
669 }</pre>
670</div>
671
672<div class="method">
673 <code class="details" id="untrash">untrash(userId, id)</code>
674 <pre>Removes the specified message from the trash.
675
676Args:
677 userId: string, The user's email address. The special value me can be used to indicate the authenticated user. (required)
678 id: string, The ID of the message to remove from Trash. (required)
679
680Returns:
681 An object of the form:
682
683 { # An email message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700684 "internalDate": "A String", # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header.
Craig Citro065b5302014-08-14 00:47:23 -0700685 "historyId": "A String", # The ID of the last history record that modified this message.
686 "payload": { # A single MIME message part. # The parsed email structure in the message parts.
687 "body": { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800688 "data": "A String", # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
Craig Citro065b5302014-08-14 00:47:23 -0700689 "attachmentId": "A String", # When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800690 "size": 42, # Number of bytes for the message part data (encoding notwithstanding).
Craig Citro065b5302014-08-14 00:47:23 -0700691 },
692 "mimeType": "A String", # The MIME type of the message part.
693 "partId": "A String", # The immutable ID of the message part.
694 "filename": "A String", # The filename of the attachment. Only present if this message part represents an attachment.
695 "headers": [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.
696 {
697 "name": "A String", # The name of the header before the : separator. For example, To.
698 "value": "A String", # The value of the header after the : separator. For example, someuser@example.com.
699 },
700 ],
701 "parts": [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example multipart/*. For non- container MIME message part types, such as text/plain, this field is empty. For more information, see RFC 1521.
702 # Object with schema name: MessagePart
703 ],
704 },
705 "snippet": "A String", # A short part of the message text.
Craig Citroe633be12015-03-02 13:40:36 -0800706 "raw": "A String", # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied.
Craig Citro065b5302014-08-14 00:47:23 -0700707 "sizeEstimate": 42, # Estimated size in bytes of the message.
708 "threadId": "A String", # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:
709 # - The requested threadId must be specified on the Message or Draft.Message you supply with your request.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700710 # - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
Craig Citro065b5302014-08-14 00:47:23 -0700711 # - The Subject headers must match.
712 "labelIds": [ # List of IDs of labels applied to this message.
713 "A String",
714 ],
715 "id": "A String", # The immutable ID of the message.
716 }</pre>
717</div>
718
719</body></html>