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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to