Contact Form Problem

dustie <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <[email protected]>
Hi all

Got an absolutely baffling problem with a bit of code that I've been 
using for a very long time now that I've never had a problem with until 
now...

Here's the code:

*<?php
$To = "[email protected]";
$Subject = "Testing";
$Headers = "From: [email protected]";
if (!isset($_POST['Email'])){ ?>
<div id="contact_form">
<form id="form" name="Form" method="post" action="<?php echo 
$_SERVER['PHP_SELF']; ?>">
<label>Name</label>
<input type="text" name="Name" />
<label>Email Address<em></label>
<input type="text" name="Email" />
<label>Message:</label>
<textarea name="Message" rows="10" cols="10"></textarea>
<button type="submit" name="Submit">Send!!</button>
</form>
</div>
<?php
     } else {
         $Line1="you got the following message:";
         $Content = "$Line1\n\nName: $_POST[Name]\n\nEmail: 
$_POST[Email]\n\nMessage:\n\n$_POST[Message]"; 
mail("$To","$Subject","$Content","$Headers");
     } ?>
*

When it runs, no email is forwarded from it.  It's always worked before 
and, after a very long time diagnosing, I've pinpointed what the problem 
is - it's the 4th line:

*$Headers = "From: [email protected]";*

Specifically, the domain name.  If I change it to *anything else* at all 
(such as wedding.com or swindon.com), the form works and the message 
arrives.  Keep it as it is though and the message just disappears down a 
black hole.  This is the same domain name that the page/site is going to 
be hosted at.  Has anyone got any idea at all why this is happening?  
All my other websites use the same code and have their own domain name 
in the email address and work perfectly. Why is this one single site not 
playing ball?

Thanks in advance

Darren
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.