You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2021/04/04 10:39:00 UTC

[jira] [Created] (JAMES-3533) Implement Email/parse

Benoit Tellier created JAMES-3533:
-------------------------------------

             Summary: Implement Email/parse
                 Key: JAMES-3533
                 URL: https://issues.apache.org/jira/browse/JAMES-3533
             Project: James Server
          Issue Type: Sub-task
          Components: JMAP
            Reporter: Benoit Tellier
            Assignee: Antoine Duprat
             Fix For: 3.6.0


https://jmap.io/spec-mail.html#emailparse

{code:java}
This method allows you to parse blobs as messages [@!RFC5322] to get Email objects. 
This can be used to parse and display attached messages without having to import them as top-level Email objects in the mail store in their own right.
{code}

The current data models within JMAP RFC-8621 implementation likely can easily be adapted to support this.

Some MUA relying on attached emails, for instance on forwards (Apple?), this would ease the end user experience.

I do not exclude working on this topic during my free time, but will likely not do so on the short term. If someone wants to get its hands on JMAP, this is likely a good issue to discover the stack...

To implement this....

 - We would likely need to implement a new EmailView (full but without the mailbox context metadata)
 - We could reuse most of the utility of the EMail.scala file to create that view from the mime4j.Message class
 - An EmailParseMethod would then, given a blobId, retrieve its content, parse it as a mime4J message then convert it to an EmailParseView, and serve it to the end user.
 - We can reuse the EmailView utils on the serialization side, and just add easy logic for EmailParse POJOs serialization.

*Definition of done*: 

 - Integration tests demonstrating Email/parse, and its data validation
 - Do not forget delegation...
 - Given an email, which have an attached message, I can parse the attached message (even if it is not TLD).



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

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org