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).