B
bl8n8r
#!/usr/bin/perl
# the main user to send the email to
$recip = '(e-mail address removed)';
# a comma separated list of users to CC the email too
$cclist = '(e-mail address removed),[email protected]';
# open a pipe to the mailx utility and feed it a subject along with
# recipients and the cclist
open (FI, "|/usr/bin/mailx -s 'TEST: New email message' $recip -c
$cclist");
# send the body of the email message and close.
# note: the email is not sent until the pipe is closed.
printf (FI "blah\nblah blah\n");
close (FI);
# the main user to send the email to
$recip = '(e-mail address removed)';
# a comma separated list of users to CC the email too
$cclist = '(e-mail address removed),[email protected]';
# open a pipe to the mailx utility and feed it a subject along with
# recipients and the cclist
open (FI, "|/usr/bin/mailx -s 'TEST: New email message' $recip -c
$cclist");
# send the body of the email message and close.
# note: the email is not sent until the pipe is closed.
printf (FI "blah\nblah blah\n");
close (FI);