Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
None
Description
Property: onDestroyRemoveEmails: Boolean
Determine whether the emails in a mailbox should be removed/destroyed when that mailbox got destroyed.
- SHOULD default to false
- If false, any attempt to destroy a Mailbox that still has Emails in it will be rejected with a {{mailboxHasEmail}}SetError.
- If true, any Emails that were in the Mailbox will be removed from it, and if in no other Mailboxes, they will be destroyed when the Mailbox is destroyed.
Request
{ "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], "methodCalls": [ [ "Mailbox/set", { "accountId": "JMAP-ID", "ifInState": "123", "create": null, "destroy": [ "0001" ], "onDestroyRemoveEmails": true } ] ] }
Response
{ "methodResponses": [ [ "Mailbox/set", { "accountId": "JMAP-ID", // the requested accountId "oldState": "123", "newState": "124", "created": null, "destroyed": [ "0001" ] } ] ], "sessionState": "abc" }
DOD:
Integration tests + proof of email deletion when the property is true
Proof of reject of the request if the property is false (with emails still present in the mailbox)