So I'm building a system that will send dynamic emails with the details of the request/order embedded in the generated address so they can respond to it and the response will go back into the system. I setup the subdomain and have a basic catch method and I have no problem with decoding the email to figure out where to stick it in the database, but I need a way to parse the mime message to actually extract the html message and the actual address it was sent to. Have any of you worked with a good library so I don't have to build those functions from scratch?
I am reading the message from stdin to a variable. Most of the stuff I'm finding is built around extracting the details from an actual inbox, which I don't have.