$to= 'somebody@somedomain.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
I am using this code try to send an email. But I have waited 10 minutes already and haven’t received any email. What am I missing here?
Nothing’s wrong in your code: I reproduced it and received the email.
Maybe it was sent to the junk box, maybe the message didn’t even reach because the IP of the mail server was banned.