Salve a tutti,
essendo nuovo spero di aver indovinato sezione.
Allora, vi spiego rapidamente il mio problema.
Ho un contact form in flash + php, il contact form funziona correttamente ed invia le email e le auto risposte senza alcun problema, nonostante il corretto funzionamento mi da comunque come messaggio finale "Your message has not been sent" (Il tuo messaggio non è stato inviato)
Spero possiate aiutarmi, di seguito le linee del php e alcune dell'AS.
|----------|
PHP:
<?php
//Type the receiever's e-mail address
$emailAddress = "noisetiltrecords@gmail.com";
//Type your Site Name
$siteName = "NoiseTilt Records";
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_message = $_POST['message'];
if( $contact_name == true ) {
$sender = $contact_email;
$receiver = $emailAddress;
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "The Name Of The Sender: $contact_name \nEmail: $sender \n\nMessage: \n\n$contact_message \n\nIP ADDRESS: $client_ip \n\n$siteName";
$emailAutoReply = "Hi $contact_name, \n\nWe have just received your E-Mail. We will get in touch in a few days. Thank you! \n\n$siteName ";
$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
$autoReply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion();
mail( $sender, "Auto Reply", $emailAutoReply, $autoReply );
if( mail( $receiver, "New E-Mail", $email_body, $extra ) ) {
echo "success=yes";
} else {
echo "success=no";
}
}
?>
|----------|
AS:
public function gotReply(arg1:flash.events.Event):void
{
var loc1:*=null;
var loc2:*=undefined;
loc1 = flash.net.URLLoader(arg1.target);
loc2 = new flash.net.URLVariables(loc1.data).success;
if (loc2 != "yes")
{
modalReader.contactForm.status.text = "Your message has not been sent.";
}
else
{
modalReader.contactForm.status.text = "Your message has been sent.";
caurina.transitions.Tweener.addTween(this, {"time":5, "onComplete":clearForm});
}
return;
}