Details

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

    Description

      = Why

      As a user, I want to create a mail draft (but empty body for the moment)

      = How

      Implement [`Email/set create` ](https://jmap.io/spec-mail.html#emailset)

      [[ "Email/set", {
        "accountId": "ue150411c",
        "create": {
          "k192": {
            "mailboxIds": {
              "2ea1ca41b38e": true
            },
            "keywords": {
              "$seen": true,
              "$draft": true
            },
            "from": [{
              "name": "Joe Bloggs",
              "email": "joe@example.com"
            }],
            "subject": "World domination",
            "receivedAt": **"2018-07-10T01:03:11Z",
            "sentAt": "2018-07-10T11:03:11+10:00",
          }
        }
      }, "0" ]]
      

      Notes:

      • omitting the body part for now (see #3910)
      • not all headers are allowed for now, only the convenience ones, as:
      • `references` | defaults to null
      • `inReplyTo` | defaults to null
      • `sender` | default to `from`
      • `from` | defaults to null
      • `to` | defaults to null
      • `cc` | defaults to null
      • `bcc` | defaults to null
      • `replyTo` | defaults to `to`
      • `subject` | defaults to null
      • `sentAt` | defaults to `now`
      • other parameters can set:
      • `mailboxIds` must be set
      • `keywords` | default is null
      • `receivedAt` | default is time of creation on server
      • server-set parameters:
      • `id`
      • `threadId`
      • `size`

      Restrictions:

      • The headers property MUST NOT be given on either the top-level Email or an EmailBodyPart — the client must set each header field as an individual property.
      • There MUST NOT be two properties that represent the same header field (e.g., header:from and from) within the Email or particular EmailBodyPart.
      • Header fields MUST NOT be specified in parsed forms that are forbidden for that particular field.
      • Header fields beginning with Content- MUST NOT be specified on the Email object, only on EmailBodyPart objects.

      = Definition of Done

      Write integration tests about email creation and error handlings.

      Delegation needs to be handled.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: