The required setup will be domain with correct PTR record, not just local domain, i.e. your local mails to be forwarded to some other SMTP. I have tested these local domain stuff 1 year ago, even though the local BSD had all the records set correctly, I've been going out on DMZ from our ISP, so the mails were there, in Gmail, but in the spam folder. As for sending mails from PHP, take a look at
their website