I trying to send email using the PHP mail function but when I use fake email and it gives me no error and I cannot find out the email was sent or not I try all the ways from other similar question answers but I don't get what I want
I need to get a delivery report
my PHP version is 7.3
my PHP codes:
$to = 'example@somesite.com';
$subject = 'Message from ';
$message = $Message ;
$headers[] = 'MIME-Version: 1.0';
$headers[] = 'Content-type: text/html; charset=iso-8859-1';
$headers[] = 'To: '. $to;
$headers[] = 'From: <sombody@theresite.com>';
if(mail($to, $subject, $message, implode("\r\n", $headers))){
echo 555;
}else{
echo 444;
}
Is there any way to get message for successful sent or fail?