Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.6.0
    • JMAP
    • None

    Description

      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:

      {
         "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ],
         "methodCalls": [
             [
                 "Email/set",
                 {
                      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
                      "destroy": ["0001"]
                 },
                 "c1"]
            ]
      }
      

      Response:

      {
        "sessionState": "75128aab4b1b",
        "methodResponses": [[
          "Mailbox/set",
          {
            "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
            "newState": "000001",
            "destroyed": ["0001"]
          },
          "c1"]]
      }
      

      *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

      Attachments

        Issue Links

          Activity

            People

              aduprat Antoine Duprat
              btellier Benoit Tellier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: