RE: send emails via perl
[email protected] ("PHILLIPS M.E.") Wed, 19 Nov 2014 14:51:58 +0000
| Newsgroups | perl.perl4lib |
|---|---|
| Message-ID | <DE5A87935C81284782298B0D297D67840459B42E@CISCMRMBS02.mds.ad.dur.ac.uk> |
> On Wed, Nov 19, 2014 at 02:19:26PM +0000, PHILLIPS M.E. wrote: > > open (MAIL, "|-", '/bin/mailx', '-s', $subject, @addresses) > > || die "Failed to e-mail report: $!\n"; >=20 > what's the point of using perl then? There's more than one way to do it. If mailx is already installed and configured then this allows you to send y= our e-mail from your Perl script without installing other modules. I have = sometimes had to use servers where installing extra modules from CPAN was n= ot under my control. I was assuming that the original poster's script was doing various other th= ings and needing to e-mail a report at the end. Obviously if the script wa= s only doing an e-mail then there would not be much point doing it this way= .... Matthew