|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68523 mail() function returns false but the email was sent.
Submitted: 2014-11-29 10:00 UTC Modified: 2014-12-01 20:27 UTC
From: dpkshrma01 at gmail dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.6Git-2014-11-29 (snap) OS: Kubuntu 14.04
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:
40 - 19 = ?
Subscribe to this entry?

 [2014-11-29 10:00 UTC] dpkshrma01 at gmail dot com
mail() function returns boolean false but the email was recieved on the other end.

Test script:
ini_set('display_errors', 1);
$to = ''; // sample email
var_dump(mail( $to, 'checking mail return value', "It is just a test mail."));

// output : boolean false
// but mail is recieved at

Expected result:
boolean true

Actual result:
boolean false


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-29 10:03 UTC] dpkshrma01 at gmail dot com
Bug #12335 reports the same issue, but, php version was out-dated, the php version for this bug report was 5.5.9
 [2014-12-01 20:27 UTC]
-Status: Open +Status: Not a bug
 [2014-12-01 20:27 UTC]
This is likely to be a system configuration issue: your sendmail binary is evidently returning a non-zero error code, even though it's delivering the message, and PHP is faithfully reporting the result. You should probably look into your MTA logs to see what error is occurring.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 11 17:01:30 2023 UTC