My computer has got apache installed(localhost), so i made a signup option, and there is an email option to which i send a mail for activation of account. I have an internet connection, now if in the PHP script, i write
mail($to,$subject,$msg);
will this code deliver the mail to the desired recepient because it is not sending it.
My computer has got apache installed(localhost), so i made a signup option, and there
Share
There is no way to be 100% sure an email was received by a recipient.
The
mail()function returns a value depending on whether there was a problem sending the email or not. You would do that like this:If the value of
$successfulisfalsethen the server had an issue sending the email. So add that to your code and see what happens. If$successfulistruethen the server is sending the email ok and your problem may lie with spam filters that are receiving the email and deleting it. You can learn more about how to prevent that in this question.