[ 
https://issues.apache.org/jira/browse/JAMES-3438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17223469#comment-17223469
 ] 

Benoit Tellier commented on JAMES-3438:
---------------------------------------

https://github.com/linagora/james-project/pull/3975 solved this

> JMAP Saving draft: specify html body
> ------------------------------------
>
>                 Key: JAMES-3438
>                 URL: https://issues.apache.org/jira/browse/JAMES-3438
>             Project: James Server
>          Issue Type: Sub-task
>          Components: JMAP
>            Reporter: Benoit Tellier
>            Assignee: Antoine Duprat
>            Priority: Major
>             Fix For: 3.6.0
>
>
> h2. Why 
> As a user, I want to be able to add a html body to my draft email
> h2. How
> Implement the html body part of  [`Email/set create` 
> ](https://jmap.io/spec-mail.html#emailset)
> {code:java}
> [[ "Email/set", {
>   "accountId": "ue150411c",
>   "create": {
>     "k192": {
>       "mailboxIds": {
>         "2ea1ca41b38e": true
>       },
>       "keywords": {
>         "$seen": true,
>         "$draft": true
>       },
>       "from": [{
>         "name": "Joe Bloggs",
>         "email": "[email protected]"
>       }],
>       "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" ]]
> {code}
> 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.
> h2. Definition of Done 
> Write integration tests about email creation with html body and error 
> handlings



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to