I have a simple php script on my domain that sends me an email:
...
$toMail = "me@gmail.com"; //this works - I get the email at my gmail
$toMail = "me@mydomain.com"; //this doesn't - I get nothing
mail($toMail, $subject, $message, $header);
What setting to I change to fix this?
I've had this problem myself, when I was redesigning a site recently.
There was an issue with the way our system was set up, so that the system thought that because the email was coming from the same domain it was a spam email and as such blocked it.
Check with your system administrator that you are allowed to be sending the emails etc.
Either that, or you'll have to modify the headers to have look like it's being sent from an external address. Hope you get it sorted.