btobin0 has asked for the wisdom of the Perl Monks concerning the following question:
I get the initial send, but once the file has been generated, I am try send it back out and the script completes without error, but no email. Please help.#Execute Test Mail Script system ('mail briantest@server.com <test'); $SIG{INT} = sub { die "Just Send it!"}; $SIG{TERM} = sub { die "Do it now!"}; sleep(1); #Unix Commands my $PrStat = qx(prstat 1 1 | grep Total); my $Mail = qx(tail -15 /var/log/syslog | grep briantest); my $Iface = qx(ifconfig -a); #Text Capture File chomp($d=`date +%Y%m%d`); open F,">Report_$d.txt"; print F "Here is the Results from the Script\n\n"; print F "-------------------------------------\n\n"; print F $PrStat; print F "-------------------------------------\n\n"; print F $Mail; print F "-------------------------------------\n\n"; print F $Iface; print "This script has finished!\n\n"; print "Generating Email!\n\n"; #system ('mail test@server.com < Report_$d.txt);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email Question
by stevieb (Canon) on Sep 24, 2015 at 19:46 UTC | |
by btobin0 (Acolyte) on Sep 24, 2015 at 20:26 UTC | |
by Corion (Patriarch) on Sep 24, 2015 at 20:32 UTC | |
by btobin0 (Acolyte) on Sep 24, 2015 at 20:49 UTC | |
by Laurent_R (Canon) on Sep 24, 2015 at 21:56 UTC | |
by Corion (Patriarch) on Sep 24, 2015 at 21:14 UTC | |
|
Re: Email Question
by u65 (Chaplain) on Sep 24, 2015 at 23:08 UTC |