have you looked for clues in the server error log?
have you checked to make sure sendmail is installed on your server and is in the location specified in the script?
tries to save the form data rather than send the data email to the specified recipient,
So you submit the form and your browser pops up a dialogue box, asking you to save the file, is this correct? I'd also look into the mail configuration. If the script errors attempting to mail, it may error and try to print the error to SDOUT before the content-type headers are printed.
Normally, printing ANYTHING out from a perl script called by a browser before the headers are printed will cause a server 500 error. In some server configurations, it won't error - sometimes it will do just as you say, assume the content-type is unknown and prompt a dialogue box.
It still sounds like phranque hit it, it's most likely the mail program is incorrectly configured, not responding, or throwing an error. Follow this:
1. Any perl script MUST print a content type header before printing anything to the browser or it will throw a 500 error.
2. Most mailers execute in this order:
a. Read/parse input data (and hopefully cleanse)
b. Compose and SEND mail
c. return response to browser.
Usually they won't output content-type headers until step C. If the mail program prints out an error in step b., it's going to error. Combine this with an incorrect error handling on your server, you get an invalid content-type which prompts a download box.
Try this: At the top of your script you should find
#!/usr/bin/perl
Right after that put a header so it prints out before the program does ANYTHING. It should look like this:
#!/usr/bin/perl
print "content-type:text/html\n\n";
The two new lines \n\n are critical.
Now run the script, if you see something new at the top, like
/usr/sbin/sendmail: no such file or directory
you've found your answer.
If not, I'm chasing the wrong bug. :-(