vfsoraki
Multipart parser
I need to parse a multipart body of an email. I searched for parsers, and I could not find anything.
There is Plus.Parsers.MULTIPART, but it works on Plus.Conn struct, and I don’t have one. I only have a string of raw body.
I couldn’t find a way to use that plus parser.
Is there anything that could help me? I mean besides writing a parser myself, I’m already working on that.
The goal is to parse body of an email sent through SMTP, but I suppose normal HTTP multipart parsers should work too.
Most Liked
OvermindDL1
Or just create a mock Plug.Conn struct and put your data where it needs to be. I’ve created a lot of fake Plug.Conn struct instances just to use some plug API’s. I wish it pulled more of it’s stuff out into libraries, I use the ‘conn’ style of pipeline coding in a lot of non-web areas… We need a Generic non-web Plug library. ^.^







