-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scheduledsubmission: draft spec from MBE 2023 #389
Draft
rjbs
wants to merge
1
commit into
jmapio:master
Choose a base branch
from
rjbs:scheduledsubmission
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+105
−0
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# JMAP Extension for Scheduled EmailSubmission | ||
|
||
# Capabilities | ||
|
||
Servers supporting this specification MUST add a property named | ||
"urn:ietf:params:jmap:scheduledsubmission" to the capabilities object. The | ||
value of this property is an empty object. | ||
|
||
# EmailSubmission | ||
|
||
EmailSubmission objects have the following additional properties: | ||
|
||
- **sendDelay**: `UnsignedInt` | ||
An additional time (in seconds) that the server will hold the email before | ||
actually sending it. A client may use a standard EmailSubmission/set call to | ||
cancel the email submission before this time passes. | ||
|
||
This property may be specified during creation, and it is never returned by | ||
the server. This property exists to allow the client to specify a minimum | ||
delay to be computed by the server, eliminating complications of clock skew | ||
or transit time. | ||
- **sendAt**: `UTCDate` | ||
When this extension is in effect, this property, defined in RFC 8621, may be | ||
set by the client on creation. It remains immutable. The Date header on the | ||
scheduled email should match the sendAt time, so rescheduling should be | ||
performed by canceling the old EmailSubmission, and scheduling a replacement | ||
email. | ||
- **onSend**: `SendAction` | ||
An action to take when the submission has been successfully sent. | ||
|
||
A *SendAction* object has the following properties: | ||
|
||
- **addToMailboxId**: `Id` | ||
A mailboxId to add to the Email associated with the EmailSubmission when it | ||
has been successfully submitted. | ||
- **created**: `UTCDate` (immutable; server-set) | ||
The date-time the submission was created. | ||
|
||
If the creation properties for an EmailSubmission contain both `sendAt` and | ||
`sendDelay` may be provided, the server MUST return an `invalidArguments` | ||
error. | ||
|
||
JMAP clients SHOULD NOT use the envelope `mailFrom` parameters to invoke ESMTP | ||
FUTURERELEASE for delayed sending, and instead SHOULD use the `sendDelay` or | ||
`sendAt` properties of EmailSubmission. | ||
|
||
### EmailSubmission/query extensions | ||
|
||
The following extra conditions may be used for filtering: | ||
|
||
- **createdBefore**: `UTCDate` | ||
The *created* property of the EmailSubmission object must be before this | ||
date-time to match the condition. | ||
- **createdAfter**: `UTCDate` | ||
The *created* property of the EmailSubmission object must be the same as or | ||
after this date-time to match the condition. | ||
|
||
The `created` property is also supported for sorting. | ||
|
||
# Mailbox | ||
|
||
A new role, "scheduled", is defined. This role is exposed in IMAP as | ||
"\Scheduled". | ||
|
||
## The Scheduled Mailbox | ||
|
||
The user may create a mailbox with a role of "scheduled", subject to the | ||
standard restrictions on role. | ||
|
||
The user may delete the Scheduled mailbox. | ||
|
||
Messages may be added to the Scheduled mailbox only as a consequence of the | ||
`onSuccessUpdateEmail` argument to EmailSubmission/set creating an | ||
EmailSubmission for that message. | ||
|
||
When an EmailSubmission's `undoStatus` is set to `canceled`, the associated | ||
email is removed from the Scheduled mailbox if and only if the email has no | ||
other associated EmailSubmission objects with a state of `pending`. | ||
|
||
When an EmailSubmission's `undoStatus` becomes `final`, the associated email is | ||
added to the mailbox identified by the EmailSubmission's `onSend` property's | ||
`addToMailboxId` property, if any. If that property is not null, but does not | ||
refer to an existing mailbox, the email should be added to the mailbox with the | ||
"sent" role. If no mailbox has the "sent" role, then the email should be added | ||
to the mailbox with the "inbox" role. Finally, if and only if the email has no | ||
other associated EmailSubmission objects with a state of `pending`, the | ||
associated email is removed from the mailbox with the "scheduled" and the | ||
mailbox with the "drafts" role. If the email is not present in any mailbox | ||
other than those, it is destroyed. | ||
|
||
Attempts to add messages to or remove messages from this mailbox via any other | ||
means MUST be rejected. | ||
|
||
IMAP servers that support the ACL extension MUST reflect these permissions in | ||
the rights for the scheduled mailbox. | ||
|
||
JMAP servers MUST provide false as the mayAddItems, mayRemoveItems, and | ||
maySubmit permissions. | ||
|
||
# Examples | ||
|
||
TODO: | ||
|
||
* scheduling an email | ||
* canceling an email |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.