should be
open MAIL, "|mail zoo\@hotmail.com";
Note to OP: With the above correction (and a bit of other help to make it a
complete script), the code you posted works fine on the Linux system to
which I ported it.
This is true.
You *could* get the code to work after a fashion with the |mail process
filehandle by writing a batch file, mail.bat, invoking msimn.exe, the
Outlook Express executable program, with the appropriate command line
parameters. Perl does indeed launch msimn.exe successfully in this case and
can even feed the command line params to the batch file, starting Outlook
Express, with the params stuffed in the right places. OTOH, that's about as
far as the success goes, as the process filehandle really doesn't function
correctly as a filehandle.
The following code (fragment) works on this Win32 (Win95SR1) workstation
open MAIL, "|mail $email $message";
with mail.bat invoking msimn.exe
msimn.exe /mailurl:mailto:%1?body=%2
That said (written), my recommendation is that you abandon the idea of using
a Perl process filehandle with Windows, as there are several much simpler
alternatives that use throroughly tested CPAN modules.
I wouldn't use an external 'mail' program.
Note to OP: Use Mime::Lite, as suggested by Mr. Briem. You will no doubt
find it to be an expedient and pleasing solution.
Cheers.
Bill Segraves