# PHP mail and sendForm function not working

**URL:** <https://forum.kirupa.com/t/php-mail-and-sendform-function-not-working/165885>\
**Category:** Uncategorized\
**Created:** [October 14, 2005, 6:40pm UTC](https://forum.kirupa.com/t/php-mail-and-sendform-function-not-working/165885 "2005-10-14T18:40:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![henriksan](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@henriksan](https://forum.kirupa.com/u/henriksan)\
**Post date:** [October 14, 2005, 6:40pm UTC](https://forum.kirupa.com/t/php-mail-and-sendform-function-not-working/165885/1 "2005-10-14T18:40:34Z")

</div>

**Hey there.**  
Yet another post about formmail in Flash and PHP …

Well, I have been reading around in the posts, but I can’t quite figure it out.  
Please anyone help. Henrik

I have a form in Flash set up with components and instance names: name, email and message.

The submit button is linked to a function sendForm

function sendForm() {  
gatherForm.visitor\_message = contactForm.message.text;  
gatherForm.visitor\_name = contactForm.name.text;  
gatherForm.visitor\_email = contactForm.email.text;  
gatherForm.send(“mail.php”, “POST”);  
}

I have the PHP file set up as in the tutorial:

$sendTo = "info@fiskdesign.net";  
$subject = “Mail from Fisk Design”;

$headers = “From: " . $\_POST[“firstName”] .” “. $\_POST[“lastName”] . “\<” . $\_POST[“email”] .”\>  
";  
// next include a replyto  
$headers .= "Reply-To: " . $\_POST[“email”] . "  
";

$headers .= "Return-path: " . $\_POST[“email”];

$message = $\_POST[“message”];

mail($sendTo, $subject, $message, $headers);

?\>
