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
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: 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 23 08:01:30 2024 UTC