I am trying to send an email with my server. I am using php's mail function. The function is returning true. But I am not receiving any email. I have checked the logs. And even the logs are not showing any error. My domain is "islamerkotha.com". My code is given below -
<?php
$msg = "First line of text\nSecond line of text";
$msg = wordwrap($msg,70);
$headers = "From: [email protected]";
mail("[email protected]", "My subject", $msg, $headers);
There are many points along the path an email message takes where yours could be failing, but take a look at the PHP mail() function page; it specifically says that the function returns true if the message was accepted for delivery and "it is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination."
EDIT: Look here for more information on PHP error reporting. If you don't see any errors then, look at phpinfo() to see if the mail() function is even enabled. If it is, then it's time to start looking further downstream...