|  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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 18:01:29 2024 UTC