|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18723 what does mail() function return?
Submitted: 2002-08-03 08:13 UTC Modified: 2002-08-04 10:13 UTC
From: asif at evoknow dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.2.2 OS: windows2K
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: asif at evoknow dot com
New email:
PHP Version: OS:


 [2002-08-03 08:13 UTC] asif at evoknow dot com
The mail() function is supposed to return FALSE if it can't send the mail. But in reality it doesn't do so. It always returns TRUE.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-03 09:17 UTC]
It should return FALSE if the mailserver, for any reason, doesn't accept the message. If the mailserver accepts the message but bounces it, PHP can't do anything about it.
Is this the case?
(BTW: you probably want to try a non-STABLE snapshot from, there were many changes to the mail handling stuff on Windows)
 [2002-08-04 07:45 UTC] asif at evoknow dot com
If that is the case, Don't you think that the manual should be updated that says: "mail() returns TRUE if the mail is successfully sent, FALSE otherwise."?
 [2002-08-04 10:13 UTC]
This is what the manual says, and that's correct:
"mail() returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise."
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 12:01:29 2024 UTC