fox94610 has asked for the wisdom of the Perl Monks concerning the following question:

I'm sending two variables (email addresses) from flash to a perl script. The script doesn't write the addresses to the specified .txt files like it should. The script is also designed to send a email message to the "receiver" email address but this also fails to function. After working on it for weeks, I haven't the foggiest notion why.

The script has no problems, writing down the addresses, and sending the email message when called from a standard hmtl sender: http://recordings.foxflare.com/roundup_album1_player/input.html
(if you put your own address, to test, don't worry I'll erase it)

The flash file is sending the same variables the same way so I'm wondering why there isn't a similar result.

Here is the flash page that doesn't work:
http://recordings.foxflare.com/roundup_album1_player/roundup_player2.html

If needed, here is the flash source:
http://recordings.foxflare.com/roundup_album1_player/roundup_player2.fla

Last, but definitely not least, here is a readable version of the perl script:
http://www.foxflare.com/blaster.txt

Unfortunately I don't know perl at all. That I've gotten the script this far is a reflection of insane persistence. If you see what needs modification, could you please show me what code is needed, and where to insert it. General guidance will do little to help considering my lack of perl experience I regret.

It would be GREATLY appreciated, Kevin

Updated: Steve_p - changed title from "Subscription problems". Turned text links into real links.

  • Comment on Problems sending email from Flash to Perl

Replies are listed 'Best First'.
Re: Problems sending email from Flash to Perl
by matija (Priest) on May 07, 2004 at 22:39 UTC
    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.
Re: Problems sending email from Flash to Perl
by dakkar (Hermit) on May 08, 2004 at 16:56 UTC

    My best guess (can't look at the flash, not having the program): Flash sends the requesta as a GET, while your test form uses POST.

    As matija noted, you're using a hand-crafted, scary-looking parser for your CGI parameters. Guess what? It only works if the data is sent with POST.

    Follow matija advice: use CGI;.

    -- 
            dakkar - Mobilis in mobile
    

    Most of my code is tested...

    Perl is strongly typed, it just has very few types (Dan)

      Ok, I swapped out that Perl code and checked out the Flash file to make sure it was correct. Here is a screen shot of the actionscript: http://www.foxflare.com/shot.gif

      As you can see the Flash file is doing a variable POST action. It still doesn't work, although the html version of the same device, is still working and writing email addresses.

      Any other suggestions out there?
      Thanks for your time and your suggestion. I'll try that and other modifications and see what happens.