|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14535 Mail function always returns false
Submitted: 2001-12-15 12:45 UTC Modified: 2002-06-02 19:54 UTC
From: steve at stevegodwin dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.1.0 OS: FreeBSD 4.1-RELEASE i386
Private report: No CVE-ID: None
 [2001-12-15 12:45 UTC] steve at stevegodwin dot com
This is to confirm the bug reported in Bug ID #14032

PHP Apache Module
Versions 4.0.4, 4.0.6
FreeBSD 4.1
Installed on a virtual server at Verio

The script below runs fine on my WinNT/IIS development server running PHP 4.0.4 as a CGI module. 

On the FreeBSD virtual server, the same script always returns false, even though the mail message has been sent successfully.

Could it be a problem with how sendmail running on FreeBSD is responding (or not responding) to the mail() function? 


$mail_to = '';
$mail_subject = 'Test Email';
$mail_message = 'This is a test';
$mail_headers = "\\n";

$sent = TRUE;

$sent = mail($mail_to,$mail_subject,$mail_message,$mail_headers);

if ( $sent == TRUE )
	print("Mail sent successfully");
	print("Mail was not sent");


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-15 22:26 UTC]
Could you try 4.10 and/or snapshot and report the result?
 [2001-12-15 22:45 UTC] steve at stevegodwin dot com
I don't have 4.1.0 loaded on the FreeBSD machine yet, but I received an email this morning from Ross (
) who had reported this problem in Bug ID #14032. 

He tested 4.1.0 yesterday and had the same result as in previous 4.x versions.

By the way, my test script runs fine in PHP3 on the FreeBSD machine, so this appears to be limited to PHP 4.x

 [2002-06-02 19:54 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 22 14:01:29 2024 UTC