From d546419d19b89633f8ac3c461eb900f4c4f29b90 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Tue, 6 Nov 2007 07:41:28 +0000 Subject: make sure tsmoke sends mime conformant mails --- bin/tSmoke.dist | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/tSmoke.dist b/bin/tSmoke.dist index 61fcaf7..b86020b 100755 --- a/bin/tSmoke.dist +++ b/bin/tSmoke.dist @@ -126,10 +126,17 @@ sub morning_update($) { $target =~ s/.rrd//; $TmpBody .= "$target\n" if $Loss == 0; } - $Body = "Subject: Of $Count Hosts, $Down Down\n"; - $Body .= "To: $To\n\n"; - $Body .= "Of $Count Hosts, $Down Down:\n"; - $Body .= $TmpBody; + $Body = <{Alerts}{from},$To,$Body); } @@ -207,8 +214,14 @@ sub weekly_update($) { } # Prepare the e-mail message - $Body = "Subject: IT System Availability\n"; - $Body .= "To: $To\n\n"; + $Body = <{General}{tmail} or die "ERROR: can't read $cfg->{General}{tmail}\n"; while (){ my $Summary = Summary_Sheet(); -- cgit v1.2.3-24-g4f1b