So, with some help, you've enabled Postfix on your machine. You've added 127.0.0.1 to your list of SMTP servers in Mail, and sending mail works. Now if you want to send email by running local PHP scripts that use the mail() function, you will probably see that your messages are being systematically rejected by the server of the recipient. In your /var/log/maillog file, you'll probably get lines like this (broken up for easier readability here):
Jul 27 20:21:34 myMac postfix/smtp[10888]: CED002D04DD: to=,
relay=mydomain.com[xxx.xxx.xxx.xxx], delay=1036, status=deferred
(lost connection with mydomain.com[xxx.xxx.xxx.xxx] while sending
MAIL FROM)
The problem is that, by default, Postfix uses the RendezVous (nee OpenTalk) .local top level domain, which is, as far as internet hosts go, invalid. Basically, Postfix is trying to send email from www@yourmac.local (www being the user PHP is being executed by, if it's running as an Apache module).
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040727144509713