CODICE ActionScript (da mettere nel tasto "invia"):

on (press)
{
if (form.nome.text == "" || form.mail.text == "" || form.agenzia.text == "" || form.messaggio.text == "")
{
getURL("javascript:alert('Attenzione: è necessario compilare tutti i campi')");
}
else
{
mail=new LoadVars()
mail.nome = form.nome.text;
mail.agenzia = form.azienda.text;
mail.mail = form.mail.text;
mail.messaggio = form.messaggio.text;

mail.onLoad=function()
{
_global.sent = this["sent"];
if(_global.sent == "si")
{
getURL("javascript:alert('Mail inviata con successo')");
form.nome.text = "";
form.agenzia.text = "";
form.mail.text = "";
form.messaggio.text = "";
}
else
{
getURL("javascript:alert('Si è verificato un errore durante l'invio. Riprovare piu tardi')");
}
}

mail.sendAndLoad("email.php" ,mail, "post");
}
}
email.php

Codice PHP:
<?php

$sendTo 
"info@togirastudio.com";
$subject "e-mail proveniente dal sito";

$headers "From: " $_POST["nome"];
$headers .= "<" $_POST["mail"] . ">\r\n";
$headers .= "Reply-To: " $_POST["mail"] . "\r\n";
$headers .= "Return-Path: " $_POST["mail"];
$message $_POST["messaggio"] . "\n------------------------\n mittente: " $_POST["nome"] . "\n agenzia: " $_POST["agenzia"] . "\n email: " $_POST["mail"];


if(
mail($sendTo$subject$message$headers))
{
    print(
"&sent=si");
}
else
{
    print(
"&sent=no");
}

?>
E' forse un po scarno e manca il controllo alla mail, ma è efficacie^^