It looks like you need to add next unless $value; to :
foreach $key (@ordnames) {
$value = $FORM{$key};
next unless $value; # added this line
# get rid of ^M and stuff
$value =~ s/\x0d\x0a/ /g;
$value =~ s/[\x0a\x0d]/ /g;
unless ( $key eq "recipient"
|| $key eq "recipients"
|| $key eq "subject"
|| $key eq "redirect_to"
|| $key eq "validate"
|| $key eq "email_field"
|| $key eq "error_head"
|| $key eq "error_foot" ) {
$outmail .= qq|$key:\t\t$value\n|;
# add each key and a tab to datastring
$outdata .= qq|$value\t|;
}
}
HTH,
Charles K. Clarkson