Bug #14981: mail() function won't send mail to a domain containing '-' hyphens

From: Date: Thu, 10 Jan 2002 22:59:19 +0000
Subject: Bug #14981: mail() function won't send mail to a domain containing '-' hyphens
Groups: php.dev 
Request: Send a blank email to php-dev+get-76549@lists.php.net to get a copy of this message
From: andrew@digitalhands.co.uk Operating system: Apache PHP version: 4.1.0 PHP Bug Type: Mail related Bug description: mail() function won't send mail to a domain containing '-' hyphens The following example script: $r = "info@the-total-solution.com"; $s = "Message submitted at website"; $m = "From: " . $name . ", email: " . $email . "\n\n" . $message; $h = "From: " . $email . "\r\n"; mail ($r, $s, $m, $h); echo "<script language=\"javascript\">window.alert (\"Thankyou, your message have been sent!\")</script>"; ought to send mail to the specified address, but does not. Or, at least, mail does not arrive. It works with all email addresses we have tried except those on this domain (ie. 'the-total-solution.com', which seems to suggest a problem with PHP, possibly relating to the fact that the domain contains hyphens? Emails from other sources are correctly reaching this address and others in the domain. Escaping by using the address "info@the\-total\-solution.com" doesn't solve the problem either. Having raised this problem with other developers, who also tested it, we can only conclude that the problem is in PHP. I am not running PHP myself, my webserver is, so I can't give any information about PHP modules / backtrace. Andrew Staffell -- Edit bug report at: http://bugs.php.net/?id=14981&edit=1

« previous php.dev (#76549) next »