diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-11-06 08:41:28 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-11-06 08:41:28 +0100 |
commit | d546419d19b89633f8ac3c461eb900f4c4f29b90 (patch) | |
tree | 7900bbecf7b33b93244a037e247b95781b19638b | |
parent | 2fe8ba68414b66a7f68f4876916ba3a98648858d (diff) | |
download | smokeping-d546419d19b89633f8ac3c461eb900f4c4f29b90.tar.gz smokeping-d546419d19b89633f8ac3c461eb900f4c4f29b90.tar.xz |
make sure tsmoke sends mime conformant mails
-rw-r--r-- | CHANGES | 2 | ||||
-rwxr-xr-x | bin/tSmoke.dist | 25 |
2 files changed, 21 insertions, 6 deletions
@@ -1,3 +1,5 @@ +* make sure tsmoke sends mime conformant mails -- tobi + 2007/10/29 -- released version 2.2.7 * Make slaves with FQDN work properly -- tobi 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 = <<MAIL_END; +Subject: Of $Count Hosts, $Down Down +To: $To +Content-Type: text/plain; charset=iso-8859-15 +Content-Transfer-encoding: 8bit +MIME-Version: 1.0 + +Of $Count Hosts, $Down Down: + +$TmpBody +MAIL_END Smokeping::sendmail($cfg->{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 = <<MAIL_END; +Subject: IT System Availability +To: $To +Content-Type: text/html; charset=iso-8859-15 +Content-Transfer-encoding: 8bit +MIME-Version: 1.0 + +MAIL_END open tSMOKE, $cfg->{General}{tmail} or die "ERROR: can't read $cfg->{General}{tmail}\n"; while (<tSMOKE>){ my $Summary = Summary_Sheet(); |