I would strongly recommend you look into getting the module installed, either locally into your account, or perhaps even by your hosting provider. See Yes, even you can use CPAN and local::lib. It's a pure-Perl module consisting of a single file, so in the worst case you could even just copy the file over.
And in the very worst case, note that the guts of the module Email::MessageID are actually quite short. Although as I said I strongly suggest getting it installed, if you really have no choice, here is a boiled-down version: