3 ways to guard your email reputation

At EventVue, our first point of contact with our users is by email. That’s why I’m obsessive about making a great first impression with our emails. It’s also the reason I work so hard to make sure that we maintain high deliverability rates.

According to George Bilbrey at Return Path, email deliverability is all about sender reputation. When people hit the “mark as spam” button, it hurts your reputation. When they click “not spam”, it helps. When you send hundreds of emails to addresses that don’t exist, your might as well tattoo “SPAMMER” onto your forehead!

What do you do when your email list is made up of unverified email addresses?

How do you tell which ones are good and which ones are bad? More importantly, what can you do to reduce the number of bounced messages and the inevitable damage to your sender reputation? Here are a few things that will help:

1) First pass: regular expressions

Your first defense in checking you have a valid email address is making sure it looks right. Pete Warden recently posted some great examples of how to use regular expressions. In PHP, you can use the preg_match() function:

$exp = '/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}/';
if (preg_match($exp, $email) <= 0)
    echo "bad email";

2) Take it to the next level: check for an MX record

A lot of people run their email addresses through a regular expression and quit there. I’ve found that doing a quick DNS lookup goes a long way towards eliminating typos from dyslexic users. In PHP, it’s easy to check whether or not a domain has a DNS record for a mail server:

function mx_record_exists($email) {
    $email_parts = split("@", $email);
    // contains exactly 1 @ sign
    if (sizeof($email_parts) != 2)
        return false;

    list($username, $domain) = $email_parts;
    if (checkdnsrr($domain, "MX")) {
        return true;
    }
    else {
        return false;
    }
}

3) Learn from your mistakes: watch your feedback loops

If an invalid email slips past your first two defenses, it doesn’t mean you have to make that mistake again. Create a blacklist for any bounced emails and make sure you don’t send an email to that address again.