php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11184 mail() is not supported in this PHP build
Submitted: 2001-05-30 01:24 UTC Modified: 2001-06-18 20:31 UTC
From: alragom at yahoo dot com Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0.5 OS: Red Hat Linux 7.1
Private report: No CVE-ID: None
 [2001-05-30 01:24 UTC] alragom at yahoo dot com
PHP was configured with the following :

./configure 
--with-mysql=/usr/local/mysql \
--with-xml \
--with-openssl=../openssl-0.9.6a \
--with-gettext \
--with-apache=../apache_1.3.20 \
--enable-track-vars \
--enable-force-cgi-redirect \
--with-imap=../imap-2001.BETA.SNAP-0105251616 \
--with-imap-ssl 

This is the simple mail script I used to test the mail() function :

<?php

$mail_to = "alragom@yahoo.com";
$mail_subject = "PHP test mail() ";
$mail_body = " i hope that this mail() function works ! \n";
$mail_body .= " this is supposed to come on the second line \n";
$mail_body .= " and this on the third line \n";

if (mail($mail_to, $mail_subject, $mail_body))
	echo "Successfully sent the email \"$mail_subject\" to $mail_to .";
else echo "Failed to send the e-mail \"$mail_subject\"." ;

?>

I using qmail 1.03 so I used the sendmail wrapper, the only change made to the default php.ini file was this :

sendmail_path   =       /usr/sbin/sendmail -t 

Upon running the above mentioned script, I get the error 

mail() is not supported in this PHP build on line 9
Failed to send the e-mail "PHP test mail() ".

Therefore I tried recompiling php-4.0.4pl1 and installing it, and was able to run the same script with no errors !

I hope that this problem is resolved. 

Thanks a lot !
Firas


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-30 06:20 UTC] sniper@php.net
Is the /usr/sbin/sendmail a regular file or a link?

Check the main/php_config.h file for HAVE_SENDMAIL
define. If it is not set, edit the file and add this line:

#define HAVE_SENDMAIL 1

Then just do 'make ; make install' and same for Apache
and you should be able to use mail() again.


--Jani

 [2001-06-18 20:31 UTC] sniper@php.net
No feedback. (and works fine for me)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC