PDA

View Full Version : mail() function not available in PHP???


dirk
23rd May 2005, 10:33
I've a big problem. I want to use PHP's mail() function to send emails, but my PHP tells me that this function isn't available... :( I thought the mail() function is built-in in PHP!? :confused:

Dirk

joe
24th May 2005, 03:35
AFAIK, it is a built-in function. What distribution and version of PHP are you using?

jojo
24th May 2005, 12:07
I've had this phenomenon once before. It happens when you compile PHP from the sources and there's no sendmail binary on the system (doesn't matter if Sendmail/Postfix or any other MTA is installed, as long as there is a sendmail binary...). Took me a few days to find out... :(
So if you try to compile PHP from the sources make sure that you have an MTA installed on your system...

Jojo

dirk
25th May 2005, 18:46
What distribution and version of PHP are you using?

SuSE 9.2 and PHP 4.3.11 (which I compiled from the sources).
I'll try to find out if Jojo's hints apply to my system...

Dirk

dirk
26th May 2005, 15:18
Ok, jojo is right. There was no sendmail binary on my system, so I've installed Postfix and re-compiled my PHP, and now the mail() function is working. :)

Dirk