# Problems sending mail with PHP, can you send from Flash with formMail.pl?

**URL:** <https://forum.kirupa.com/t/problems-sending-mail-with-php-can-you-send-from-flash-with-formmail-pl/274645>\
**Category:** flash\
**Created:** [November 2, 2008, 12:33am UTC](https://forum.kirupa.com/t/problems-sending-mail-with-php-can-you-send-from-flash-with-formmail-pl/274645 "2008-11-02T00:33:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanmarkshan](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@shanmarkshan](https://forum.kirupa.com/u/shanmarkshan)\
**Post date:** [November 2, 2008, 12:33am UTC](https://forum.kirupa.com/t/problems-sending-mail-with-php-can-you-send-from-flash-with-formmail-pl/274645/1 "2008-11-02T00:33:07Z")

</div>

Hi,

I am at wits end. I have a simple contact for on my web site. I built it just as the tutorial instructed and it’s just not working. Can anyone tell me what I’m doing wrong?

This is the Action Script for the form:  
var senderLoad:LoadVars=new LoadVars();  
var receiveLoad:LoadVars=new LoadVars();

submit.onRelease=function() {  
senderLoad.yourEmail=yourEmail.text;  
senderLoad.sendAndLoad(“[http://atlastotalweb.com/send.php](http://atlastotalweb.com/send.php)”,receiveLoad);

}

receiveLoad.onLoad = function() {  
if(this.sentOk) {  
\_root.gotoAndStop(“success”);  
}  
else {  
\_root.gotoAndStop(“failed”);  
}

}

This is the send.php file that I have on the server:

\<?PHP

$to = "shandahardin@yahoo.com";  
$subject = “Flash Contact Form Submission”;  
$message = "Name: " . $theName;  
$message .= "  
Email: " . $theEmail;  
$message .= "

Message: " . $the message;  
$headers = “From: $the Email”;  
$headers .= "  
Reply-To: $theEmail";

$sentOk = mail ($to,$subject,$message,$headers);

echo “sentOk=” . $sentOk;

?\>
