下書き
メールボックスに保存された未送信のメッセージ。
下書きのツール
| ツール | 機能 |
|---|---|
| listDrafts | 下書きを最近保存した順に返し、それぞれに件名、受信者、送信者が付く。query で検索できる。 |
| getDraft | 1 つの下書きの全体: 送信者、受信者、件名、返信先のスレッド、添付ファイル、本文。 |
| createDraft | 新しい下書きを送信せずに保存する。どのフィールドも省略でき、threadId を渡すと返信になる。 |
| updateDraft | 下書きのフィールドを変更する。省略したフィールドは値がそのまま残り、リストは保存済みのものを丸ごと置き換える。 |
| deleteDraft | 下書きを完全に削除する。ゴミ箱には入らない。 |
読み取りには「下書きを読み取る」(drafts:read)、保存、変更、削除には「下書きを作成・編集する」(drafts:write)が必要である。一部のアドレスに限定されたクライアントに見えるのはそれらのアドレスの下書きだけで、保存する下書きには、そのクライアントが送信元にできる from が必要になる。
アプリのチャットでは、下書きの保存、変更、削除は、依頼された場合を除いて事前に確認する。
リファレンス
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.
入力
querystringlimitinteger- 1以上100以下
pageTokenstring
ほかの提供先
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.
入力
draftIdstring必須- 空でないこと
ほかの提供先
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.
入力
tostring[]ccstring[]bccstring[]subjectstring- 998文字まで
htmlstring- 1000000文字まで
textstring- 1000000文字まで
fromstringthreadIdstring
ほかの提供先
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.
入力
draftIdstring必須- 空でないこと
tostring[]ccstring[]bccstring[]subjectstring- 998文字まで
htmlstring- 1000000文字まで
textstring- 1000000文字まで
fromstring- null も可
threadIdstring
ほかの提供先
deleteDraft
Delete a draft for good. It does not go to the Bin and cannot be brought back. Take the id from listDrafts.
入力
draftIdstring必須- 空でないこと