$mailprog = '/usr/sbin/sendmail -oi -t -oem';
open(MAIL,"¦$mailprog");
print MAIL "To: $recipient\n";
print MAIL "From: $Config{'email'} ($Config{'realname'})\n";
print MAIL "Subject: $Config{'subject'}\n\n" }
foreach $field (@Field_Order) {
print MAIL "$field: $Form{$field}\n\n";
}
close (MAIL);
...etc... (it's a secured variation of formmail.pl)
This used to work fine on a different server. I've moved to a new server and
now this error has cropped up.
Any ideas?
How do we know it's the script mangling it, rather than that the script never got all the data to begin with?
Do you get all the data if you output to the screen rather than to MAIL?
There are three choices for wrap in the HTML for a text area field: Virtual, Physical, and Off. Have you tried each of those?
String substition might help, if you could replace the bad newline character with a good newline character:
$text =~ s/badchar/\n/;
But of course the trick would be knowing what the bad newline character is....
Let us know how it turns out.
I may also install an unmodified formmail.pl to see what it does, since they should work "out of the box".
I'll post my findings here, and thanks again for your suggestions.
$mailprog = '/usr/sbin/sendmail -i -t';
and it does the same thing - dropping text after the first return in the text box. No other changes were made to the script. The "thank you for filling out this form" output to screen does show the entire text:
"skldjfskljfsjsdfsdfjs sdf sdf sd fsdf sdf end"
But in the email it is cut off after "skldjfskljfsjsdfsdfjs"
I'm now wondering if the server's sendmail is messed up somehow. Replacing a return with some other character might likely fix it, but I'm worried something larger is the cause.