i’m trying to do this mail sending form… i have worked with sendAndLoad before and it worked perfect, but not in a sending mail situation. :{
please take a look over my code and let me now if you see why this should not work:
[AS]
sBtn.onRelease = function (){
var lv:LoadVars = new LoadVars();
var rv:LoadVars = new LoadVars();
lv.sName = t1;
lv.sEmail = t2;
lv.nTel = t3;
lv.sMsg = t4;
rv.onLoad = function(success){
if (success){
t4 = “Thank you for your interest in ImeiMate. We will contact you shortly.”
}else{
t4 = “Error connecting to server.”;
}
}
lv.sendAndLoad(“mailer.php”, rv, “POST”);
t1 = “”;
t2 = “”;
t3 = “”;
t4 = “sending…”;
}
[/AS]
and this is the PHP:
<?php
$nume = $_POST['sName'];
$tell = $_POST['nTel'];
$mail = $_POST['sEmail'];
$mess = $_POST['sMsg'];
$mess .= "
";
$mess .= $tell
$mess .= "
";
$mess .= $mail;
mail("alin.danila@gmail.com", "Mail from:$nume", $mess, "From:Do_not_reply");
$answer = "ok";
print "&answer=".$answer;
?>