# ARGH! Simple PHP mailing form not working!

**URL:** <https://forum.kirupa.com/t/argh-simple-php-mailing-form-not-working/188407>\
**Category:** Uncategorized\
**Created:** [May 7, 2006, 2:07pm UTC](https://forum.kirupa.com/t/argh-simple-php-mailing-form-not-working/188407 "2006-05-07T14:07:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ya3](https://avatars.discourse-cdn.com/v4/letter/y/e95f7d/32.png) [@ya3](https://forum.kirupa.com/u/ya3)\
**Post date:** [May 7, 2006, 2:07pm UTC](https://forum.kirupa.com/t/argh-simple-php-mailing-form-not-working/188407/1 "2006-05-07T14:07:03Z")

</div>

```php
<?php
$name=$_GET['name'];
$email=$_GET['email'];
$comments=$_GET['comments'];
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
// target email address
$youremail = "mail@XXXXXXXXX.com.au"; //edited for kF
// send email
$headers = "From: \"".$email."\"
";
$subject = "Contact Form from fundamental.net.au";
$message = "Name: $name
Email: $email
IP Address: $hostname
Message: $comments";

mail ("$youremail", "$subject", $message, $headers)
?>

```

I always use this exact same code for all my sites, but this is the first time I’m running a site off a Windows server, and apparently there are some slight discrepancies with the layout of the $headers bit (you can’t have formatting within the headers). So I stripped down the $headers to display only the sender’s email address, as per the instructions I found.

I execute the script… no warnings… but the email doesn’t seem to come through :-/

Any ideas?
