in reply to Problems sending email from Flash to Perl

The first thing that strikes me about your Perl program is that it uses a very ill-advised method of parsing the CGI parameters.

I suggest that you remove all the "DO NOT EDIT" code with this:

use CGI qw/:standard/; foreach (param()) { $INPUT{$_}=param($_); }
Before you replace that, (and test how it works) I don't even want to look at the rest of the code.