المُرسَلة والمجدولة
بريد خرج أو ينتظر أن يخرج.
أدوات المُرسَلة والمجدولة
| الأداة | ما تفعله |
|---|---|
| listSentEmails | البريد الذي أرسلته مساحة العمل أو سترسله، الأحدث أولًا، حسب status أو المُرسِل أو البث، أو نافذة زمنية بين scheduledFrom وscheduledTo. |
| getSentEmail | بريد واحد مُرسَل أو مجدول: حالته، ومتى يحين موعده أو متى خرج، وما الخطأ الذي حدث، وإلى أين وصل لدى كل مستلِم. |
| listEmailEvents | ما حدث لبريد واحد، الأقدم أولًا: الإرسال، والإخفاق، وإعادة الجدولة، وإن كان متتبَّعًا، كل فتح ونقر وتنزيل. |
| rescheduleEmail | انقل بريدًا لم يُرسَل بعد إلى وقت جديد، لحظة بصيغة ISO 8601 أو مدة مثل PT2H. |
| updateScheduledEmail | غيّر موضوع بريد لم يُرسَل بعد، أو متنه، أو مُرسِله، أو مستلميه. |
| cancelEmail | أوقف بريدًا لم يُرسَل بعد. لا يمكن استرجاعه، بل إرساله من جديد فقط. |
تتطلب القراءة «قراءة الرسائل المرسلة وحالة تسليمها» (emails:read)، ويتطلب النقل أو التغيير أو الإلغاء «إرسال البريد» (emails:send). والعميل المقصور على بعض العناوين لا يصل إلا إلى البريد المرسَل منها، ومن لا يصل دوره إلى كل عنوان لا يجوز له أن ينقل أو يغيّر أو يلغي إلا البريد الذي أرسله بنفسه.
الرسالة التي تُرجمت عند قبولها تحتفظ بصياغتها، والتي شُفّرت تحتفظ بصياغتها وبمستلميها، لذا يرفض updateScheduledEmail تغييرها. ألغِها وأرسلها من جديد بدلًا من ذلك.
في محادثة التطبيق، يسأل cancelEmail دائمًا أولًا، أما نقل بريد أو تغييره فيسأل ما لم تطلبه أنت.
المرجع
listSentEmails
Mail this workspace has sent or will send, newest first: messages sent through the app, the API and automations, with their status. status keeps some statuses: queued and scheduled are still waiting, sending, sent, partial, failed and cancelled are not. scheduledFrom and scheduledTo, ISO 8601 instants, keep the messages scheduled inside that window, which with status scheduled and queued is what is waiting to go out. When more follow, the last line gives a cursor.
المدخلات
statusstring[]- أحد
"queued""scheduled""sending""sent""partial""cancelled""failed" fromstringscheduledFromstring- التنسيق
date-time scheduledTostring- التنسيق
date-time broadcastIdstringlimitinteger- على الأقل 1على الأكثر 100
cursorstring
متاح أيضًا في
getSentEmail
One sent or scheduled email by id: its status, when it is due or went out, what went wrong if anything did, and where it stands with each recipient. Take the id from listSentEmails or from what sendEmail returned.
المدخلات
idstringمطلوب- غير فارغ
متاح أيضًا في
listEmailEvents
What happened to one sent email, oldest first: accepted, queued, scheduled, sent, failed, cancelled, rescheduled and, when it was tracked, every counted open, click and download. When more follow, the last line gives a cursor.
المدخلات
idstringمطلوب- غير فارغ
limitinteger- على الأقل 1على الأكثر 100
cursorstring
متاح أيضًا في
rescheduleEmail
Move a scheduled or queued email to a new time. scheduledAt is an ISO 8601 instant or a duration such as PT2H, in the future and at most a year out. getCurrentDate gives the time now.
المدخلات
idstringمطلوب- غير فارغ
scheduledAtstringمطلوب- غير فارغ
متاح أيضًا في
updateScheduledEmail
Change an email that has not gone yet: its subject, its body as html or text, the address it goes out as, or who it goes to. A recipient list replaces the stored one whole. A field you leave out keeps its value. A message translated when it was accepted keeps its wording, and one that was encrypted keeps its wording and its recipients, so cancel it and send again instead.
المدخلات
idstringمطلوب- غير فارغ
subjectstring- حتى 998 من الأحرف
htmlstring- حتى 1000000 من الأحرف
textstring- حتى 1000000 من الأحرف
fromstringtoobject[]- من 1 إلى 50 من العناصر
emailstringمطلوب- حتى 320 من الأحرفالتنسيق
email namestring- حتى 128 من الأحرف
ccobject[]- حتى 50 من العناصر
emailstringمطلوب- حتى 320 من الأحرفالتنسيق
email namestring- حتى 128 من الأحرف
bccobject[]- حتى 50 من العناصر
emailstringمطلوب- حتى 320 من الأحرفالتنسيق
email namestring- حتى 128 من الأحرف
متاح أيضًا في
cancelEmail
Stop an email that has not gone yet: a scheduled one, or one still inside its undo window. It cannot be brought back afterwards, only sent again. One that has already gone cannot be cancelled. Cancelling twice is not an error.
المدخلات
idstringمطلوب- غير فارغ