summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2007-11-06 08:41:28 +0100
committerTobi Oetiker <tobi@oetiker.ch>2007-11-06 08:41:28 +0100
commitd546419d19b89633f8ac3c461eb900f4c4f29b90 (patch)
tree7900bbecf7b33b93244a037e247b95781b19638b /bin
parent2fe8ba68414b66a7f68f4876916ba3a98648858d (diff)
downloadsmokeping-d546419d19b89633f8ac3c461eb900f4c4f29b90.tar.gz
smokeping-d546419d19b89633f8ac3c461eb900f4c4f29b90.tar.xz
make sure tsmoke sends mime conformant mails
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tSmoke.dist25
1 files changed, 19 insertions, 6 deletions
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();