Borradores
Mensajes sin enviar guardados en el buzón.
Herramientas de borradores
| Herramienta | Qué hace |
|---|---|
| listDrafts | Los borradores, primero los guardados más recientemente, cada uno con su asunto, sus destinatarios y su remitente. query busca en ellos. |
| getDraft | Un borrador completo: su remitente, sus destinatarios, su asunto, el hilo al que responde, sus adjuntos y su cuerpo. |
| createDraft | Guarda un borrador nuevo sin enviarlo. Todos los campos son opcionales, y threadId lo convierte en una respuesta. |
| updateDraft | Cambia campos de un borrador. Un campo que omites conserva su valor, y una lista sustituye entera a la guardada. |
| deleteDraft | Elimina un borrador para siempre. No va a la papelera. |
Leer requiere «Leer borradores» (drafts:read) y guardar, cambiar o eliminar requiere «Crear y editar borradores» (drafts:write). Un cliente limitado a algunas direcciones solo ve los borradores de esas direcciones, y un borrador que guarda necesita un from con el que pueda enviar.
En el chat de la app, guardar, cambiar y eliminar un borrador preguntan antes salvo que lo hayas pedido tú.
Referencia
listDrafts
The unsent drafts in the mailbox, most recently saved first, each with its id, subject, recipients and sender. query searches the subject, the sender and the start of the body. When more follow, the last line gives a pageToken: call again with the same query and that pageToken.
Entradas
querystringlimitinteger- Al menos 1Como máximo 100
pageTokenstring
También disponible en
getDraft
One draft in full: its sender, recipients, subject, the thread it replies to, the names of its attachments and its body as saved. Take the id from listDrafts.
Entradas
draftIdstringObligatorio- No vacío
También disponible en
createDraft
Save a new draft without sending it, as the composer does when you close it. Every field is optional, and html wins over text when both are given. from is the address it will be sent as, and threadId makes it a reply to that thread. sendEmail with the draft id sends it later.
Entradas
tostring[]ccstring[]bccstring[]subjectstring- Hasta 998 caracteres
htmlstring- Hasta 1000000 caracteres
textstring- Hasta 1000000 caracteres
fromstringthreadIdstring
También disponible en
updateDraft
Change fields on a saved draft. A field you leave out keeps its value, and a list you give replaces the saved one whole, so to with one address drops the others. from null clears the sender. Take the id from listDrafts.
Entradas
draftIdstringObligatorio- No vacío
tostring[]ccstring[]bccstring[]subjectstring- Hasta 998 caracteres
htmlstring- Hasta 1000000 caracteres
textstring- Hasta 1000000 caracteres
fromstring- Puede ser null
threadIdstring
También disponible en
deleteDraft
Delete a draft for good. It does not go to the Bin and cannot be brought back. Take the id from listDrafts.
Entradas
draftIdstringObligatorio- No vacío