php-windows Digest 7 Jun 2011 07:12:14 -0000 Issue 3955

Topics (messages 30641 through 30645):

Re: Contact Form Problem
        30641 by: Gallant, Bryan
        30642 by: Steven Scott
        30643 by: dustie
        30644 by: Niel Archer

Windows builds
        30645 by: Lester Caine

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Sounds more like a blacklisted email domain...

-----Original Message-----
From: dustie [mailto:djd...@ntlworld.com] 
Sent: Monday, June 06, 2011 12:55 PM
To: php-wind...@lists.php.net
Subject: [PHP-WIN] 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 = "djd...@ntlworld.com";
$Subject = "Testing";
$Headers = "From: cont...@weddingdjswindon.com"; 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: cont...@weddingdjswindon.com";*

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

--- End Message ---
--- Begin Message ---
On Mon, Jun 6, 2011 at 2:18 PM, Gallant, Bryan <bryan.gall...@hma.com> wrote:
>
> Sounds more like a blacklisted email domain...
>
> -----Original Message-----
> From: dustie [mailto:djd...@ntlworld.com]
> Sent: Monday, June 06, 2011 12:55 PM
> To: php-wind...@lists.php.net
> Subject: [PHP-WIN] 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 = "djd...@ntlworld.com";
> $Subject = "Testing";
> $Headers = "From: cont...@weddingdjswindon.com"; 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: cont...@weddingdjswindon.com";*
>
> 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?

--- End Message ---
--- Begin Message --- On Mon, Jun 6, 2011 at 2:18 PM, Gallant, Bryan <bryan.gall...@hma.com> wrote:
Sounds more like a blacklisted email domain...
It's not.

--- End Message ---
--- Begin Message ---
> 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 = "djd...@ntlworld.com";
> $Subject = "Testing";
> $Headers = "From: cont...@weddingdjswindon.com";
> 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: cont...@weddingdjswindon.com";*
> 
> 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

First thing I would suggest, is test the return value from mail, that
you currently ignore, to see if the message was accepted by the MTA. If
that is true you know the script is fine and to pursue the problem
elsewhere. If false, check your MTA is setup properly.

--
Niel Archer


--- End Message ---
--- Begin Message ---
I've cross posted to the windows list as this is a useful link!

http://www.anindya.com/

I don't feel quite so bad now about not being able to update my own builds, but a matching Additional Extensions section for the x86 builds would just finish the picture.

I'm just waiting for an OK to use the links in my own tutorials.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---

Reply via email to