> Hi can anyone give me any tips on how to interact with vms mail?
> I thought something like this may work but it doesn't play ball,
> open(MAIL,"|mail") || die "Can't open mail\n";
> print MAIL "send\n";
> print MAIL "martin\n";
> print MAIL "my subject\n";
> print MAIL "some body text\n";
> print MAIL "^Z";
> print MAIL "exit\n";
> close (MAIL);
I haven't been able to make that work properly either. However, all is not
quite lost. In one case, consider the format:
$ MAIL SYS$INPUT recipient1,recipient2 /SUBJECT="your desired subject"
Text
text
text
text
text
$ EXIT
If you write a temp file like this and system("@TEMPfilename"), you can send
mail readily. Of course, you have to go to some (considerable) trouble to
trap errors in sending the mail..
Better would be to use something like Dan Sugalski's SMAIL routine, which
connects nicely to the local SMTP server and sends the mail that way; that'll
work on or off VMS (but does require that you have an SMTP server somewhere).
I gave up messing with talking to VMS mail from Perl and use SMAIL, and my life
has improved since I did.
Find that as part of his Nodewatch script at
www.sidhe.org/vmsperl/scripts/nodewatch.zip
(If you're really insane, you can write a Perl interface to the callable mail
API, but I wouldn't mess with it for that purpose if I were you.)
-- Alan
--
===============================================================================
Alan Winston --- [EMAIL PROTECTED]
Disclaimer: I speak only for myself, not SLAC or SSRL Phone: 650/926-3056
Paper mail to: SSRL -- SLAC BIN 99, 2575 Sand Hill Rd, Menlo Park CA 94025
===============================================================================