You seem to be using Email::MIME in an undocumented way, I suggest you follow the documentation exactly (see examples t/nested-parts.t and t/multipart.t)
Also, you need to clean your room better, as the mirroring/IO::All portion of your program doesn't seem to relate to your problem.
Comment on Re: Email::Mime send multiple attachments