PHP / Laravel 5 - Check if email is successfully received by recipient

1.3k Views Asked by At

How do I check if the email is RECEIVED by the recipient? In Laravel 5, I try using this method from this question:

$status = Mail::send('blah', $data, function($message) {
    // callback function
});

if($status) {
   // email is successfully sent
}
else {
   // email is not sent
}

But even if the email is invalid, I still got $status = 1 after the code execution. I also have tried Mail::failures() which contain an array of failed attempt. But it always return 0, which mean all email is succesfully sent.

Is there any other way that I can check whether in Laravel?

OR

is it possible to check if the email is valid using PHP? Since the email is invalid, there is no point to send it.

1

There are 1 best solutions below

0
On

To check if someone has received put this in the header:

 Disposition-Notification-To:<[email protected]>

But this option is not very reliable it is better to check if your email was read like so:

<img src="http://yourdomain.com/received?read=<email of `receiver>">

This method also does not always work. For example if the Email client doesn't download the images automatically.

I hope this helped anyway and was what you were searching for.