Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an implementable (non-theoretical) way to prove if email address belong to real email account?

Tags:

java

bash

php

email

Is there a way to prove that a certain email address is "real", therefore belongs to a really existing email account ? I get masses of registrations via emails that are valid according to email pattern definition, but do not really exist. Sending to fake mail addresses costs a lot of money, as we (and others) pay per mail (100.000 sendings to fake mail accounts can cost you four-digit numbers per year, just to show a number). I want to check for exactly that moment. We don't care if the email adress is offline 1 minute later.

An ideal solution would be a bash one-liner (that could be called with every major language).

What i have done so far:

  1. Checking this similar 3yo thread, which is simply wrong for a real-world case. I want to check if an email adress exist, in the moment i'm sending a mail (to prevent costs).
  2. checking if the hostname is pingable.
  3. checking if the email adress is pingable, like here. I tried to rebuild this in a bash script, but failed (fetching the adress is hard!).

What i really want:

A reliable check if the mail account exists implementable by the average coder, in PHP or Java. A bash one-liner or a php/java library that does exactly this. Free or commercial.

I'll provide bounty!

like image 992
Sliq Avatar asked Dec 12 '22 12:12

Sliq


1 Answers

It's called "double opt-in".

  1. The user enters their email address in your registration form.
  2. The user clicks a box that says "yes, please email me".
  3. You send an email to that user along the lines of "Hi, this is to confirm your account. Please click this link."
  4. Once the link is clicked you have as much confirmation that you're ever going to get, and you're less likely to either be a spammer, or be mistaken for one.

Other such magic spells for not wasting paid emails are:

  • "using a mailer that knows what a 500-level SMTP error means" [aka, not mail()] and deleting that person from your list.
  • "Bounce Processing" and deleting that person from your list.
  • "A working unsubscribe process" that works, and also deletes that person from your list. Did I mention that is should work?

If you [or anyone reading this] have not gathered your email lists voluntarily without at least some level of the user opting in there's an advanced technique that us email admins call "pissing up a rope" where you hang a length of rope from a high place and see how high up it from directly beneath it.

like image 118
Sammitch Avatar answered Jan 13 '23 17:01

Sammitch