Rascunhos
Mensagens por enviar guardadas na caixa de correio.
Ferramentas de rascunhos
| Ferramenta | O que faz |
|---|---|
| listDrafts | Os rascunhos, primeiro os guardados mais recentemente, cada um com o assunto, os destinatários e o remetente. query pesquisa-os. |
| getDraft | Um rascunho completo: o remetente, os destinatários, o assunto, a conversa a que responde, os anexos e o corpo. |
| createDraft | Guardar um rascunho novo sem o enviar. Todos os campos são opcionais, e threadId torna-o uma resposta. |
| updateDraft | Alterar campos de um rascunho. Um campo que omitir mantém o valor, e uma lista substitui por inteiro a guardada. |
| deleteDraft | Eliminar um rascunho de vez. Não vai para o Lixo. |
Ler exige «Read drafts» (drafts:read), e guardar, alterar ou eliminar exige «Create and edit drafts» (drafts:write). Um cliente limitado a alguns endereços só vê os rascunhos desses endereços, e um rascunho que guarde precisa de um from com que possa enviar.
No chat da aplicação, guardar, alterar e eliminar um rascunho pergunta primeiro, a menos que o tenha pedido.
Referência
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- Pelo menos 1No máximo 100
pageTokenstring
Também disponível em
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
draftIdstringObrigatório- Não vazio
Também disponível em
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- Até 998 caracteres
htmlstring- Até 1000000 caracteres
textstring- Até 1000000 caracteres
fromstringthreadIdstring
Também disponível em
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
draftIdstringObrigatório- Não vazio
tostring[]ccstring[]bccstring[]subjectstring- Até 998 caracteres
htmlstring- Até 1000000 caracteres
textstring- Até 1000000 caracteres
fromstring- Pode ser null
threadIdstring
Também disponível em
deleteDraft
Delete a draft for good. It does not go to the Bin and cannot be brought back. Take the id from listDrafts.
Entradas
draftIdstringObrigatório- Não vazio