2

Is there a way to be a 100% sure that the email you want to send is actually delivered (I'm not talking about an email address that doesn't exist)?

Can you do an extra check? I'm working in Larevel 5.0.

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85
nielsv
  • 6,540
  • 35
  • 111
  • 215

3 Answers3

3
Mail::send(...)

And Error Reporting is

if( count(Mail::failures()) > 0 ) {

   foreach(Mail::failures as $email_address) {
       echo "$email_address <br />";
    }

} else {
    echo "Mail sent successfully!";
}
Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85
  • Hi spartan, isnt mail::send() asynch? how will the if statement catch all? sorry I couldnt find the api docs for this. – Gokigooooks Sep 03 '16 at 14:38
  • @AbdullaNilam Hi! What if while sending an email it returns the error, so how can you check it while sending an email? For example, you have a weak internet connection or your connection has been stop or cut, it still returns an error. – Blues Clues Jul 25 '17 at 03:20
1

Are you checking Mail::failures() ?

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85
kunoichi
  • 91
  • 5
0

If you want 100% certainty, you should use a third party API such as mailgun. Laravel supports them out of the box, and they offer in-depth tracking.