Call to undefined function: mail()

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
velgar
Forum Newbie
Posts: 4
Joined: Mon Jul 12, 2004 9:56 am

Call to undefined function: mail()

Post by velgar »

I use suse 9.1 and apache2.0.49 php-4.3.4 and i use mail() function the php call me: Call to undefined function mail()! Where is the problem?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

When PHP was compiled it couldn't find a sendmail binary, so no mail().
You need to install sendmail/qmail/etc and recompile PHP.
velgar
Forum Newbie
Posts: 4
Joined: Mon Jul 12, 2004 9:56 am

Post by velgar »

Thanks markl999 but i use postfix as sendmail. Do i need to uninstall postfix and instal sendmail?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Nope, you just need a sendmail binary available, i.e qmail has it's own /usr/sbin/sendmail to replace the one that comes with sendmail .. i'm pretty sure most of them do, so it doesn't have to be sendmail, you just need any MTA that provides a sendmail 'binary' ... if that makes sense ;)
I should have just said "Yes, postfix will do." :o
Post Reply