Sent and scheduled
Mail that went out or is waiting to.
Sent and scheduled tools
| Tool | What it does |
|---|---|
| listSentEmails | Mail the workspace sent or will send, newest first, by status, sender, recipient, tag, broadcast, or a since and until or scheduledFrom and scheduledTo window. |
| getSentEmail | One sent or scheduled email: its status, when it is due or went out, what went wrong and where it stands with each recipient. |
| listEmailEvents | What happened to one email, oldest first: sent, failed, rescheduled and, when tracked, every open, click and download. |
| getThreadDelivery | Whether the mail sent in a thread arrived: its recipients, and how many bounced, reported it as spam, failed or were suppressed. |
| rescheduleEmail | Move an email that has not gone yet to a new time, an ISO 8601 instant or a duration such as PT2H. |
| updateScheduledEmail | Change the subject, body, sender or recipients of an email that has not gone yet. |
| cancelEmail | Stop an email that has not gone yet. It cannot be brought back, only sent again. |
| sendRawEmail | Send a message that is already built, such as a raw source, as written: its own headers, threading and parts. |
Reading needs “Read sent messages and their delivery status” (emails:read), and moving, changing or cancelling needs “Send email” (emails:send). A client limited to some addresses reaches only the mail sent from them, and someone whose role does not reach every address may move, change or cancel only the mail they sent.
A message translated when it was accepted keeps its wording, and one that was encrypted keeps its wording and its recipients, so updateScheduledEmail refuses to change them. Cancel it and send again instead.
In the app’s chat, cancelEmail always asks first, and moving or changing an email asks unless you asked for it.
Reference
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, bounced, failed and cancelled are not. bounced means every recipient refused it after it left, partial that only some recipients have it. 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. since and until keep the messages made inside a window, recipient the ones that went to one address as a to, cc or bcc recipient, and tag the ones sent with a tag: name for any value, name:value for one, matched exactly. When more follow, the last line gives a cursor.
Inputs
statusstring[]- One of
"queued""scheduled""sending""sent""partial""bounced""cancelled""failed" fromstringscheduledFromstring- Format
date-time scheduledTostring- Format
date-time sincestring- Format
date-time untilstring- Format
date-time recipientstring- Up to 320 charactersFormat
email tagstring- 1 to 330 characters
broadcastIdstringlimitinteger- At least 1At most 100
cursorstring
Also available in
- API
GET /emails- TypeScript
emails.list()emails.listAll()emails.iterate()- Python
emails.list()emails.list_all()emails.iterate()- Ruby
emails.listemails.list_allemails.iterate- PHP
emails->listemails->listAllemails->iterate- Go
Emails.ListEmails.ListAllEmails.Iterate- Java
emails().listemails().listAllemails().iterate- C#
Emails.ListAsyncEmails.ListAllAsyncEmails.IterateAsync
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.
Inputs
idstringRequired- Not empty
Also available in
- API
GET /emails/{id}- TypeScript
emails.get()- Python
emails.get()- Ruby
emails.get- PHP
emails->get- Go
Emails.Get- Java
emails().get- C#
Emails.GetAsync
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. Give id, the msg_ id listSentEmails gives, or messageId, the Message-ID header it went out with, with or without its angle brackets, as the app does for a message it shows. With both, it answers only when they name the same email. address answers only when the email went out from that address, as the address filter of the Tracking page does. When more follow, the last line gives a cursor.
Inputs
idstring- Not empty
messageIdstring- 1 to 998 characters
addressstring- 3 to 320 characters
limitinteger- At least 1At most 100
cursorstring
Also available in
- API
GET /emails/eventsGET /emails/{id}/events- TypeScript
emails.listEventsByMessageId()emails.listAllEventsByMessageId()emails.iterateEventsByMessageId()emails.listEvents()emails.listAllEvents()emails.iterateEvents()- Python
emails.list_events_by_message_id()emails.list_all_events_by_message_id()emails.iterate_events_by_message_id()emails.list_events()emails.list_all_events()emails.iterate_events()- Ruby
emails.list_events_by_message_idemails.list_all_events_by_message_idemails.iterate_events_by_message_idemails.list_eventsemails.list_all_eventsemails.iterate_events- PHP
emails->listEventsByMessageIdemails->listAllEventsByMessageIdemails->iterateEventsByMessageIdemails->listEventsemails->listAllEventsemails->iterateEvents- Go
Emails.ListEventsByMessageIDEmails.ListAllEventsByMessageIDEmails.IterateEventsByMessageIDEmails.ListEventsEmails.ListAllEventsEmails.IterateEvents- Java
emails().listEventsByMessageIdemails().listAllEventsByMessageIdemails().iterateEventsByMessageIdemails().listEventsemails().listAllEventsemails().iterateEvents- C#
Emails.ListEventsByMessageIdAsyncEmails.ListAllEventsByMessageIdAsyncEmails.IterateEventsByMessageIdAsyncEmails.ListEventsAsyncEmails.ListAllEventsAsyncEmails.IterateEventsAsync
getThreadDelivery
Whether the mail this mailbox sent in a thread arrived: how many recipients it went to, and how many of them bounced, reported it as spam, could not be sent to, or were held back by the suppression list, with how many messages reached only some of their recipients and an error one of them came back with. It is the delivery warning the app shows on a thread. Give it a thread id. address counts only what one address sent. listEmailEvents tells what happened to one sent email.
Inputs
threadIdstringRequired- Not empty
addressstring- 3 to 320 characters
Also available in
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.
Inputs
idstringRequired- Not empty
scheduledAtstringRequired- Not empty
Also available in
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.
Inputs
idstringRequired- Not empty
subjectstring- Up to 998 characters
htmlstring- Up to 1000000 characters
textstring- Up to 1000000 characters
fromstringtoobject[]- 1 to 50 items
emailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
ccobject[]- Up to 50 items
emailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
bccobject[]- Up to 50 items
emailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
Also available in
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.
Inputs
idstringRequired- Not empty
Also available in
- API
POST /emails/{id}/cancel- TypeScript
emails.cancel()- Python
emails.cancel()- Ruby
emails.cancel- PHP
emails->cancel- Go
Emails.Cancel- Java
emails().cancel- C#
Emails.CancelAsync
sendRawEmail
Send a message that is already built, as written: raw is the bytes of an RFC 5322 message, base64-encoded, such as the source getMessageSource returns or a message another system assembled. Use sendEmail or replyToEmail for anything you write yourself; this is only for a finished message. It goes out with its own headers, threading and parts through every check a send makes. The sender is its From header, and from may only repeat it. The recipients are its To, Cc and Bcc headers unless to, cc or bcc give the envelope instead, as with SMTP. A Bcc header never leaves. It carries no signature unless signature is true or signatureId names one, and a signed or encrypted message is never rewritten or tracked.
Inputs
rawstringRequiredThe message as base64: the bytes of an RFC 5322 message, headers and body, at most 10 MB once decoded.
1 to 14348938 charactersfromstringThe address in the From header of the message, to make sure it is the one sending. Leave it out to send as that address.
toobject[]The envelope, as SMTP RCPT TO. Give to, cc or bcc and they replace the recipients the headers name; the headers go out as written.
Up to 50 itemsemailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
ccobject[]- Up to 50 items
emailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
bccobject[]- Up to 50 items
emailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
threadIdstring- Up to 256 characters
scheduledAtstringAn ISO 8601 time, such as 2030-01-15T09:00:00Z, up to a year ahead, to send it then rather than now. It waits in Scheduled until that time, and cancelEmail or rescheduleEmail change it before then.
Up to 64 characterssignaturebooleanThe from address's signature is added below the message, as in the app. false leaves it off.
signatureIdstringWhich of the from address's signatures to add, by the id listSignatures reports. Left out, new mail carries the address's default and a reply its default for replies.
1 to 64 characterstrackOpensbooleantrue adds an open pixel to this message and false leaves it out. Left out, the setting of the address it is sent from decides, and that is off unless the address turned it on. Set it only when the user asks to track or not to track.
trackClicksbooleantrue sends the links in this message through the tracking domain to count clicks and false leaves every link as written. Left out, the setting of the address it is sent from decides, and that is off unless the address turned it on. A link whose text is itself an address is never rewritten.