Benoit Tellier created JAMES-3410:
-------------------------------------
Summary: Email/set: Destroy email
Key: JAMES-3410
URL: https://issues.apache.org/jira/browse/JAMES-3410
Project: James Server
Issue Type: Sub-task
Components: JMAP
Reporter: Benoit Tellier
Assignee: Antoine Duprat
Fix For: 3.6.0
This is the implementation of the destroy part of Email/set.
>From JMAP specs https://jmap.io/spec-mail.html#emailset :
> Destroying an Email removes it from all Mailboxes to which it belonged. To
> just delete an Email to trash, simply change the mailboxIds property, so it
> is now in the Mailbox with a role property equal to trash, and remove all
> other Mailbox ids.
> When emptying the trash, clients SHOULD NOT destroy Emails that are also in a
> Mailbox other than trash. For those Emails, they SHOULD just remove the trash
> Mailbox from the Email.
When destroying an email, it removes it from all mailboxes to which it belongs.
Any other operation is an update of `Mailboxids` and is of no concern in this
ticket.
**Example**
Request:
{code:java}
{
"using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ],
"methodCalls": [
[
"Email/set",
{
"accountId":
"29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
"destroy": ["0001"]
},
"c1"]
]
}
{code}
Response:
{code:java}
{
"sessionState": "75128aab4b1b",
"methodResponses": [[
"Mailbox/set",
{
"accountId":
"29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
"newState": "000001",
"destroyed": ["0001"]
},
"c1"]]
}
{code}
**DoD**
* Write integration tests showing email is getting removed from all Mailboxes
it belongs to and deleted from the system when doing an Email/set destroy
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]