Re: Contact Form Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 6, 2011 at 2:18 PM, Gallant, Bryan <Bryan.Gallant@xxxxxxx> wrote:
>
> Sounds more like a blacklisted email domain...
>
> -----Original Message-----
> From: dustie [mailto:djdust@xxxxxxxxxxxx]
> Sent: Monday, June 06, 2011 12:55 PM
> To: php-windows@xxxxxxxxxxxxx
> Subject:  Contact Form Problem
>
> 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 = "djdust@xxxxxxxxxxxx";
> $Subject = "Testing";
> $Headers = "From: contact@xxxxxxxxxxxxxxxxxxxx"; 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: contact@xxxxxxxxxxxxxxxxxxxx";*
>
> 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
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Could the email address be invalid, and is therefore failing a check
by the main mail service?

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux