php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27107 email validation
Submitted: 2004-01-31 11:01 UTC Modified: 2004-01-31 11:33 UTC
From: davod at powell dot co dot nz Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5CVS-2004-01-31 (dev) OS: Red Hat Linux 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: davod at powell dot co dot nz
New email:
PHP Version: OS:

 

 [2004-01-31 11:01 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-31 11:33 UTC] derick@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC