I'm experiencing a similar issue to the one raised in this question.
sendmail (via PHP) will send an email unless its to an address with the same domain as the server its on.
I understand this is because the sendmail is trying to send the email locally.
I have limited control over the server, as its a shared hosting environment. I'm pretty much limited to configuring php.ini and modifying the php. Within these limitations is there a way I can tell sendmail to do what I want?
Failing that, the only other option I see is to use SMTP and have google send the email, which seemed overkill, given that sendmail is there ready to be used.