Have you tried ```Rex::MIME::Message``` for this?