Looking for an option to convert the raw email message RFC 822 to java MimeMessage object. MimeMessage has an option to convert the object to raw email context using MimeMessage#writeTo, self looking best approach of vice versa.
Background:
Sendgrid - Inbound parse invoke API and sent the raw email content part of json payload, from which we have to collect the email content and attachment files.