# Mail form

**URL:** <https://forum.kirupa.com/t/mail-form/196107>\
**Category:** Uncategorized\
**Created:** [August 5, 2006, 1:44pm UTC](https://forum.kirupa.com/t/mail-form/196107 "2006-08-05T13:44:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aBnest](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/abnest/32/2177_2.png) [@aBnest](https://forum.kirupa.com/u/aBnest)\
**Post date:** [August 5, 2006, 1:44pm UTC](https://forum.kirupa.com/t/mail-form/196107/1 "2006-08-05T13:44:58Z")

</div>

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:

```auto

<?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;

?>

```
