1

I'm using laravel 8 for my website project. I've tested for both Gmail driver or my hosting server email driver and everything is fine and mails were delivered successfully.

I just want to catch errors for situations when I try to send mail for wrong or non existing email addresses.

For example: What happens when we try to send email to "somefakeemail@gmail.com" and how to catch such kinds of errors. Thanks

1 Answers1

2

The subject of web marketing is too vast to handle in stackoverflow.

Gmail can tell you if an account exist because they keep track of bounced emails. Of course, if it's a gmail, they check their own DB.

When you send an email to a non existing account, usualy the receipient server responds with a bounce email to tell you that it doesnt exists.

All web marketing application/email service providers keep track of bounced email because it deteriorates their notoriety, and it goes low enough, future sent mail will end up directly in junk/spam and will not be responded to.

You can track if an email has been opened with a tracking pixel but it's not 100% accurate.

A tracking pixel, is just that, a 1x1 image (often transparent) present on the email that has a link to your server. when the user opens the email, it loads the image via a get request.

For example: <img src="example.com/pixel.php?email=jhon@example.com" />

the scripts return an image, but before that it regiters that the email is valid.

This also can be countered by not loading the images of the email (notice that almost all email service providers ask you to confirm load the images in an email.

The most accurate method is to request an activation from the user at subscription or more commonly named confirm email or double opt in This requires that the user enters a valid email to be able to continue the registration process. but even here, people can use temporary email (google "temporary disposable email")

TLDR; You can't tell directly that an email address doesnt exists. (unless you already know that by tracking bounces)

N69S
  • 16,110
  • 3
  • 22
  • 36
  • Thank you a lot, this question is asked for the subscriptions-related tasks. I've developed a registration process with verifying email process. But For my subscription where the user just types email and subscribes. For this, I'm just storing the email and sending mail but not confirming that process email. And when I'm sending some advertisement email then I've no idea that all emails in the subscription table all correct or not. Now I need to make the subscription process with confirm email too so that when sending advertisement email no email found to be wrong. Thank a lot – full_stack_developer Jul 02 '21 at 17:04