Originally posted by Xeo:
<STRONG>I've been trying to get the mail() function to work and so far I haven't had any luck. First, I found out sendmail isn't enabled by default in OS X. I tried to get that to work with no sucess so instead I followed the advice of some MUG and installed "postfix" or whatever it's called. Now, at least my computer is working as an SMTP server. I can tell Mail.app to use "localhost" as the SMTP server and the mail goes through just fine.
But, now I can't figure out why mail() isn't working in PHP. Are there any steps I need to take on the PHP side? Maybe something with php.ini? I haven't tried much because I don't know where to start.
TIA</STRONG>
There is a setting in PHP.ini that explicitly sets the command to use for mail. I have no experience with Postfix, so can't tell you what the command would be, but you can check postfix's docs.
To get sendmail working, check the following URLs:
http://www.publicsource.apple.com/bu...s/2695647.html http://www.publicsource.apple.com/bu...l/2547692.html
and this piece of info:
==========================
Okay, first, remove the "-" from both sides of your hostname in /etc/hostconfig
Second, run "sudo chmod g-w /" You'll probably have to do this everytime
you update OS X via Software Update or if you run an updater.
Third, run "open -e /System/Library/StartupItems/Sendmail/Sendmail" ...
towards the bottom you'll see the line that launches sendmail followed by
a "&" Delete the "&"
Finally, run "sudo chmod 1777 /var/mail"
==========================
The URLs should give you an idea of what the prob is. The bottom bit explains how to address it.