المسوّدات
رسائل غير مُرسَلة محفوظة في صندوق البريد.
أدوات المسوّدات
| الأداة | ما تفعله |
|---|---|
| listDrafts | المسوّدات، الأحدث حفظًا أولًا، لكلٍّ منها موضوعها ومستلموها ومُرسِلها. ويبحث فيها query. |
| getDraft | مسوّدة واحدة كاملة: مُرسِلها ومستلموها وموضوعها والمحادثة التي تردّ عليها ومرفقاتها ومتنها. |
| 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مطلوب- غير فارغ