In the real world, your question would be fine. If you were a colleague or friend asking I'm sure most people would be happy to answer it.
However, Stack Overflow has developed a very narrow focus over the years, and become rather intolerant of questions that doesn't fit this focus.
For one, questions that are actually two questions are strongly discouraged.
For another, "Is this code the right way to do X?" type questions tend not to get great responses.
This has several reasons. They take a lot of effort and analysis to answer, plus they are very specific to your situation. That is not in line with SO's mission of creating an archive of canonical questions and answers that are useful to others. The site is not intended to be a help and tutoring forum.
Whether this sometimes harsh attitude is a necessary act of quality control in light of more than 7,000 new questions a day, or unnecessary bureaucratic meanness, or something in between, depends on who you ask.
Your second question, "how do I deal with attachments?", is answered in the linked duplicate question, so formally, the closing was arguably OK.
However, the answer is not exactly brimming with detail. Had I been involved in the closing I might have voted to keep your question open, and edit it into shape instead, to invite better answers.
In its current form, though, your question will always face difficulties, and I don't think it would be right to reopen it unedited.
To try and help you out, I have started a bountybounty on the duplicate questionduplicate question, and edited its title, to see whether it can attract more detailed answers - possibly with code samples.
Alternatively, do check out the hints in the existing answer: PEAR::Mail::Mime::Decode is a viable way to go, as are other libraries that can decode a MIME mail.