|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
45 + 48 = ?
Subscribe to this entry?

 [2004-01-31 11:01 UTC] davod at powell dot co dot nz
The mail() command verifies email addresses. It wont forward messages unless the "From: $email" address is correct. It will forward messages ending, .cc, and so on. It will not, however accept email addresses ending as being valid.

Reproduce code:
 $Name = $_REQUEST['Name'] ;
 $Organisation = $_REQUEST['Organisation'] ;
 $tel = $_REQUEST['tel'] ;
 $email = $_REQUEST['email'] ;
 $agree = $_REQUEST['agree'] ;
 $message = $_REQUEST['message'] ;

    mail( "", " Sale",
      "Name: $Name\nOrganisation: $Organisation\nTel: $tel\nEmail:$email\nComments: $message", "From: $email" );
    header( "Location:" );

Expected result:
email addresses ending should be accepted

Actual result:
messages from addresses ending are not sent.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-31 11:33 UTC]
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-2023 The PHP Group
All rights reserved.
Last updated: Wed Mar 22 02:04:11 2023 UTC