php.net |  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
 [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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-03 09:17 UTC] sander@php.net
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 snaps.php.net, 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] sander@php.net
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 Dec 06 04:01:28 2024 UTC