$var =~ s/\>/>/g;
$var =~ s/\"/\"/g;
$var =~ s/@/@/g;
+ # Also remove undesired newlines and consecutive spaces.
+ $var =~ s/[\n\s]+/ /gms;
return $var;
}
my $reply = reply(to => $input_email, top_post => 1, body => "$msg\n");
MessageToMTA($reply->as_string);
}
- print STDERR $msg;
+ print STDERR "$msg\n";
# We exit with a successful value, because we don't want the MTA
# to *also* send a failure notice.
exit;