Details

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

    Description

      Why

      As a user, I want to be able to add a html body to my draft email

      How

      Implement the html body part of [`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",
            "htmlBody": [
              {
                "partId": "a49d",
                "type": "text/html"
              }
            ],
            "bodyValues": {
              "a49d": {
                "value": "<!DOCTYPE html><html><head><title></title>
                  <style type=\"text/css\">div{font-size:16px}</style></head>
                  <body><div>I have the most <b>brilliant</b> plan. Let me
                  tell you all about it. What we do is, we</div></body>
                  </html>",
                "isTruncated": false
              }
            }
          }
        }
      }, "0" ]]
      

      Note:

      • we don't implement the body text for now, only the html part
      • `bodyStructure` is too complex, we only implement with `htmlBody` for now

      Restrictions:

      • htmlBody MUST contain exactly one body part and it MUST be of type text/html.
      • Within an EmailBodyPart:
      • The charset property MUST be omitted if a partId is given (the part’s content is included in bodyValues, and the server may choose any appropriate encoding).
      • The size property MUST be omitted if a partId is given.
      • A Content-Transfer-Encoding header field MUST NOT be given.
      • Within an EmailBodyValue object, isEncodingProblem and isTruncated MUST be either false or omitted.

      Definition of Done

      Write integration tests about email creation with html body and error handlings

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: