php.net |  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
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dpkshrma01 at gmail dot com
New email:
PHP Version: OS:

 

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

Test script:
---------------
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$to = 'mail@email.com'; // sample email
var_dump(mail( $to, 'checking mail return value', "It is just a test mail."));

// output : boolean false
// but mail is recieved at mail@email.com

Expected result:
----------------
boolean true

Actual result:
--------------
boolean false

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] aharvey@php.net
-Status: Open +Status: Not a bug
 [2014-12-01 20:27 UTC] aharvey@php.net
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-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 21 21:03:37 2022 UTC