I am new to php. I have used a mail() function in order to send mails. I know for a fact that the mail function is used just for queuing up the mail to the server and further has no hand in it. I wanted to ask whether there is any method of knowing as to what was the error if the mail has not been queued to be sent on the server.(Sending of the mail being an entirely different problem).
Considering my code to be:
if(mail($to,$subject,$content,$headers))
{
echo"Sent";
}
else
{
print_r(error_get_last());
echo"not sent";
}
I have seen this question but the answer doesn't solve my problem.
Thanks in advance and apologies if the question appears to be baseless to you.