#27107 [Opn->Bgs]: email validation

From: Date: Sat, 31 Jan 2004 16:33:09 +0000
Subject: #27107 [Opn->Bgs]: email validation
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-54215@lists.php.net to get a copy of this message
ID: 27107 Updated by: derick@php.net Reported By: davod at powell dot co dot nz -Status: Open +Status: Bogus Bug Type: Mail related Operating System: Red Hat Linux 7.2 PHP Version: 5CVS-2004-01-31 (dev) New Comment: The mail() function doesn't verify anything, it just calls your sendmail. Have a look in your mail deamon logs to see what is wrong, can't be PHP. Previous Comments: ------------------------------------------------------------------------ [2004-01-31 11:01:10] davod at powell dot co dot nz Description: ------------ The mail() command verifies email addresses. It wont forward messages unless the "From: $email" address is correct. It will forward messages ending .com.au, .cc, .co.uk and so on. It will not, however accept email addresses ending .co.nz as being valid. Reproduce code: --------------- <? $Name = $_REQUEST['Name'] ; $Organisation = $_REQUEST['Organisation'] ; $tel = $_REQUEST['tel'] ; $email = $_REQUEST['email'] ; $agree = $_REQUEST['agree'] ; $message = $_REQUEST['message'] ; mail( "david@powell.co.nz", "vehicle.co.nz Sale", "Name: $Name\nOrganisation: $Organisation\nTel: $tel\nEmail:$email\nComments: $message", "From: $email" ); header( "Location: http://www.vehicle.co.nz/thankyou.html" ); ?> Expected result: ---------------- email addresses ending .co.nz should be accepted Actual result: -------------- messages from addresses ending .co.nz are not sent. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27107&edit=1

« previous php.bugs (#54215) next »