This is most likely your issue... your server has to be configured to allow PHP to send mail into the wide world to begin with. The second issue is it's not reliable and you have to be SURE your DNS MX related records are set correctly, even more-so than with SMTP.
If you are on shared hosting, or using a VPS with a panel and have the ability to create email accounts, you have the ability to use SMTP. I'd suggest using it instead.
There are so many different factors that can affect receiving email.
If you don't have your DNS entries for DKIM, SPF and such configured correctly, most major mail providers will block it.
It's honestly not as simple as getting an email account with SMTP access and then sending to the world.
And yes, the email being hosted elsewhere can have an affect on delivery abililty.
If you want to see what the issues are, there is a great site for testing email deliverability.