views:

998

answers:

0

I've been struggling to get a really basic PHP function working on my iMac, the PHP mail() function.

I've used it countless times, albeit on a Windows platform and now I'm trying to get it running on Mac.

I've installed XAMPP v1.01 maybe because I didn't know any better at the time and I thought it would all just work fine, because that's what it's supposed to do. (Or so I thought).

I've tried the following pages of instructions to no avail:

To start with I did not have an entry for: MAILSERVER=-YES- in my /etc/hostconfig so I created it.

I added the full path to sendmail in my php.ini: sendmail_path = "/usr/sbin/sendmail -t -i"

I understand I don't need to set a myhostname variable in /etc/postfix/main.cf because I'm only planning on sending mail not receiving it. (NB. I've also tried it with this setting enabled!)

I've start postfix and then tried running the script but the script just processes with no error message, it just basically constantly looks as if it's working but nothing happens (I've triple checked the code for script).

I noticed some peoples solutions do not even mention having to start the postfix daemon for them to get the PHP mail() function to work.

Any ideas or things for me to try?

If you need more info, please ask.

P.