I had the exact same problem, and emails never even reached the junk folder, they just never arrived. Here is what I did:
In outlook.com:
In your account -> click the settings gear -> More mail settings -> Safe and blocked senders -> safe senders.
Add your domain: example.com
For hostname it wont be white listed automatically so add it as well: yourhost.example.com
PHP:
Make sure your $senderEmail
(that is attached to the $headers
) is within the safe sender you have added.
$headers = "From: " . $senderName . " <" . $senderEmail . ">";
$success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );
This made it go straight to inbox.
Hope this helps.
EDIT:
It may also be far easier and productive to use a 3rd party service such as SendGrid or MailGun since directly meddling with email and servers configurations could be a major time sink.