I have a slight problem. I am using a working script (works on my testing account - shared server) to send a mail through PHP using the mail() function.

I just got a dedicated server, and I haven't been able to get the function to work. I've spent the last 10 or so hours reading various documentations on BIND (for the SPF record), dovecot, sendmail and postfix trying various things to get this to work.

There is clearly something that I am missing. 

So we know the PHP code works fine. All the headers are fine everything. We know this as it's a direct copy from my testing account. So the problem must arise somewhere in the server config. The path to sendmail is correct, and sendmail is (apparently) working fine. I've set up the script to now deliver "Sent" or "Error" based on the boolean result from the PHP mail() function. That is:

```
if(mail($blah,$blah,$blah,$blah,$blah)) { echo "Sent"; } else { echo "Error";}

```

And the result ALWAYS comes up as "Sent" - however, the email never arrives. Can someone suggest things to check, as I'm completely new to this (24 hours or so!).

Thanks in advance.

Ryan