If you use the mail() command to send your mail, then whether or not your mail will get delivered depends not just on what headers you send specifically with your mail, but also on the reputation of the machine from which you send mail.
If your site is hosted from a shared machine, then some other domain or user hosted by that machine could be sending out millions of spam emails for all you know.
If your site is hosted from a virtual machine (like Amazon EC2 or Rackspace Cloud Server or Digital Ocean Droplet) then the IP address of that virtual server might be on a Policy Block List. I've read that there are a billion addresses on this list. If I'm not mistaken, that's nearly a quarter of all IP V4 addresses in existence. If the IP that originates your email is on this list then your mail is probably going to get blocked as spam.
So what do you do to improve mail deliverability? There are a few things
try to get your email address removed from the PBL. This won't happen if your server is spewing spam mail (possibly sent by other users).
Create Sender Policy Framework record. These are DNS records that help your server declare what domains should be sending email for whom.
Set up Domain Keys. I know almost nothing about this.
Set up your server to send mail through some email account via SMTP (this is pretty easy with gmail but there are limits to how much email you can send). All you need is something like PEAR::Mail or PHPMailer.
* Set up your server to send mail through some reputable mail-delivery service like MailChimp or SendGrid. These companies let you pay money to send a ton of mail if you really need to. They tend to offer SMTP access so you can use PEAR::Mail or PHPMailer to integrate with your PHP code.
We had an old 'best practices' thread we were maintaining here which may have helpful info.