You can install any module (or at least the vast majority, I suppose there might be some with hard-coded path nonsense) anywhere you like.
Installation is often more than just copying files. Some modules check for dependencies, compile and link code and configure themselves at installation. If you just copy the installed files you skip all these steps. If you are moving to a different platform this is more likely to be a problem.
You can gain some insight into what the issues might be for a particular module by looking at how it is built and installed. If all that is done is copy .pm files into place, then you can just copy the files yourself. If more is done you will have to think carefully about the implications of skipping those steps when you copy the files yourself.
What goes in the message is one thing. How you deliver it is another. If the body of the message is plain text, preparing it is easy. You still need to send it, either to a local or remote mail server, unless you are writing it directly to a local mailbox. There are perl modules that deliver via SMTP protocol without use of an external program.
I have used Net::SMTP for simple cases in the past but there are many others. A search of CPAN for smtp yields many results.
|