php:无法发送电子邮件

I've made a website with a mailing form, and the php to send it is as follows:

<?php
$to = "example@outlook.com";
$subject = $_POST["subject"];
$message = $_POST["message"];

$headers = 'From: webmaster@example.com' . "
" .
'Reply-To: webmaster@example.com' . "
" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

It won't send anything. Can anyone tell what's wrong in the script?

If it helps on anything, I'm trying to send to an Outlook email.

Thanks