Im building an automated newsletter, im kinda stuck with this problem. I need to know if the email was sent or not. Here is my code
@$send = mail($emailReci
I'd like to add a bit more information in @Daya's answer and I want to do bit modification in his answer and that is following:
If the email will send successfully then not an issue but if mail function has error then how could developer will get the error and for that he/she can use error_get_last()
function for getting last error and the modification is following:
if(!$mail) {
print_r( 'Mailer error: ' . error_get_last());
} else {
echo 'Message has been sent.';
}