OK Let's get into it! This tutorial involves too much setting up for me to go through every step. Download the source file and open it up you will see the following:
  • Two frames, both with stop instances. The first contains the content, the second is a confirmation page.
  • Three text fields, whose variable names (from the top down) are subject, message, and from (notice I use italics because text fields store variables, thus their names are variables).
  • A "Send" button with some actions on it, (we'll get into that later).

If you open the PHP3 file in any plain text editor you will see it has the following code. Please note, this code is actually PHP4 code since most people seem to be using PHP4.x now and lots of people were having trouble with the older code:

<?php
 mail("yourem@ilhere.com", $_GET["subject"], $_GET["message"], "From: PHPMailer
Reply-To: $_GET["
from"]
X-Mailer: PHP/"
. phpversion());
 ?>

If you want the PHP3 code, it looks like this:

<?php
 mail("yourem@ilhere.com", $subject, $message, "From: PHPMailer
Reply-To: $from
X-Mailer: PHP/"
. phpversion());
 ?>

Evaluation (What it does, and how):

<?php This tag marks the beginning of a PHP document. It tells the server we're tlaking in PHP now, not text or HTML
mail () A great little built-in PHP function. Can you guess what it does? (Hint: it doesn't make coffee).
youre@mailhere.com Replace this code with the email address you wish your form to send to.
$subject In PHP '$' denotes a variable. Thus this is the variable called subject. It has no value until we pass it one (which we'll learn about below)
$message The variable message.
PHPMailer This defines the sender of the email. If you're using this script for a comments or contact page I suggest you leave this code as is, or change it to something else obvious like "CommentsSubmitter" ( no spaces!! ). You could, if you like, adjust this to show the email address of the use who is sending the comments (so long as they can input their email in he Flash form) but that is covered in the next clause. I say you're better off leaving it as it, because you can readily identify all mail from "PHPMailer@yourdomain.com" (this is the address that will appear in your email viewing program), as comments submitted from your comments page. Furthermore, the next clause (Reply To) allows you to use your reply button as you normally would to reply to an email.
$from The variable from which we will define in the Flash file. This stores the email address of the sender and allows you to reply to their message.
?> Tells the server we've finished talking in PHP.

Basically, all you have to do is enter the email address you want these forms to be sent to and then save this PHP3 file (as a plain text file, maintaining the PHP3 extension).

Don't worry if this code seems a bit beyond you, it doesn't really need much edging. Let's move on...