log.pl
changeset 11 80890c874a90
parent 10 21b549d5c57b
child 12 b3edfead728b
equal deleted inserted replaced
10:21b549d5c57b 11:80890c874a90
   169 		or die "Can't create Mailer: $!\n";
   169 		or die "Can't create Mailer: $!\n";
   170 
   170 
   171 	    my $subject = (split /\n/, $text)[0];
   171 	    my $subject = (split /\n/, $text)[0];
   172 	    $subject =~ s/^\s*\S\s//;	# cut the "itemizer"
   172 	    $subject =~ s/^\s*\S\s//;	# cut the "itemizer"
   173 	    $subject = encode_qp("Service [". hostname(). "]: $subject\n");
   173 	    $subject = encode_qp("Service [". hostname(). "]: $subject\n");
   174 	    $subject =~ s/\n(.)/\n\t\1/g;
   174 	    $subject =~ s/\n(.)/\n\t$1/g;
   175 
   175 
   176 	    $mailer->open({
   176 	    $mailer->open({
   177 		"To" => $mailto,
   177 		"To" => $mailto,
   178 		"Subject" => $subject});
   178 		"Subject" => $subject});
   179 	    print $mailer $head, "\n", $text;
   179 	    print $mailer $head, "\n", $text;