# (2) Added rules based paging (Stephen Johnson Nov 14, 1998)
# (3) Added checks against Acks and downtime (Stephen Johnson Mar 17, 1999)
#
-# $Id: spong-message.pl,v 1.34 2002/05/07 18:39:45 sljohnson Exp $
+# $Id: spong-message.pl,v 1.35 2002/05/08 15:11:02 sljohnson Exp $
use lib "@@LIBDIR@@";
$tmp = strftime($DATETIMEFMT,localtime($time));
$str =~ s/!!DATETIME!!/$tmp/g;
}
+ if ($str =~ /!!DETAILEDHTML!!/) {
+ $tmp = $message;
+ $tmp =~ s/\n/<br>\n/mg;
+ $str =~ s/!!DETAILEDHTML!!/$tmp/g;
+ }
return $str;
}
open( MAIL, "|$SENDMAIL" ) || die "Can't open sendmail: $!";
print MAIL "To: $recipient\n";
print MAIL "Subject: $subject\n";
- print MAIL "Content-Type: text/plain; charset=us-ascii\n";
+ if ( grep(/<HTML>/,$body) ) {
+ print MAIL "Content-Type: text/html; charset=us-ascii\n";
+ } else {
+ print MAIL "Content-Type: text/plain; charset=us-ascii\n";
+ }
print MAIL "\n"; # Header/Body boundry
print MAIL "$body\n";
close( MAIL );