How to extract data from multipart/mixed request in Spray

Table of contents
Reading Time: < 1 minute

If you are getting multipart/mixed response then how should we handle that in spray so that we can extract all the data from that.

Suppose we are getting email request in which contains all the information such as: from , to, attachment etc.

So here is the way to extract those :

Written by 

Rishi is a tech enthusiast with having around 10 years of experience who loves to solve complex problems with pure quality. He is a functional programmer and loves to learn new trending technologies. His leadership skill is well prooven and has delivered multiple distributed applications with high scalability and availability by keeping the Reactive principles in mind. He is well versed with Scala, Akka, Akka HTTP, Akka Streams, Java8, Reactive principles, Microservice architecture, Async programming, functional programming, distributed systems, AWS, docker.