Tutorial details:
Written by: Jesse Stratford
Time: 20 minutes
Difficulty Level: Intermediate
Requirements: Flash 4+, PHP3+ support.
Topics Covered: custom functions, substring(), variable manipulation, loadVariablesNum and POST method, input text fields, delete(), mail() [PHP]

NOTE: This version doesn't do anything. It's just for show :o)

Click here to download the working source for this tutorial. (Flash 5, PC Zip file). Please note that this file uses the depreciated "add" syntax on Line 7 of Frame 2. Users of Flash 8 and higher will have to replace all occurrences of "add" with the "+" operator.

Welcome one and all! In this tutorial we're going to learn about sending mail using PHP and Flash. As always, my code is Flash 5 based but a half-knowledgible Flash 4 user could convert it back to ActionScript 4 quite easily. This simple tutorial will teach you how to send mail from your server to any email address around the world, with customized subjects, senders and messages. Applications include: Contact Us forms, like the sample above; Anonymous remailers; E-Card distribution things. The form I've used would allow you to append your site's footer at the end of each email sent if you were to be making an anonymous remailer for example.

Warning: I will only say this once: If you allow end-users to define the email address to which this email is to be sent you leave yourself open to all sorts of troubles. There are those users out there who would abuse an anonymous remailer service and any email they send is logged back to your web-server. So watch your back! (My example does not allow users to define he target email address to prevent such abuse).

We'll begin coding over the page...