Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7079495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:40:45+00:00 2026-05-28T06:40:45+00:00

Possible Duplicate: How to check if an email address exists without sending an email?

  • 0

Possible Duplicate:
How to check if an email address exists without sending an email?

Possible duplicate:

How to check if an email exists without sending an email?

I have a very big database with users (over 50000) and there are lots of automated e-mails the site sends out.

The problem is, quite a few of the addresses in the database (that users registered with years ago) have expired or have been deleted or no longer exist for whatever reason.

This creates an issue, because each user should have a valid e-mail.

I’ve been trying to find out if there’s a way to detect whether an e-mail address is active, so we could update the database and prompt those users to enter a new e-mail? Something like a ping for e-mail addresses?

There’s some code here that I’ve tried to figure out but to no avail:

http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/smtpvalidateclassphp/

Does anyone have a solution?

Please note that I need a PHP solution, not command line since I have 50k e-mails to check.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:40:45+00:00Added an answer on May 28, 2026 at 6:40 am

    Two things, first you should stop the influx of potentially in-valid email addresses by implementing a ‘closed-loop’ email verification system. Basically, when a user signs up for your site, you send an email with a link confirming their email address, and when they confirm, their account gets full access to your site.

    Secondly, there is no real way to determine if an an email address is invalid strictly using PHP. I had to tackle this problem a few months ago, and we ended up using the mail-server to tell us if an email address has been bounced back or not. When your mail server sends an email, and the email cannot be delivered, the recipient mail-server will respond with a bounce notification to your mail-server which includes information as to why the email was bounced. Information such as a Delivery Status Notification (DSN) code which identifies why the email address couldn’t be delivered.

    Some example codes:

    • 511: Bad Mailbox
    • 512: Bad System
    • 516: Mailbox Moved

    These codes are made up of a prefix (4 or 5) to indicate a transient (temporary) or permanent failure. The following two digit code indicates an error range; two digit codes between 10 and 19 indicate an error relating to the email address, whereas codes between 20 and 29 indicate an error relating to the email mailbox.

    From these codes you can determine, based on business requirements, a ‘hard bounce’ or a ‘soft bounce’. A hard bounce would be something like 511 (bad mailbox), where it’s certain that this email address is not currently valid. A soft bounce would be something like 445 (network congested), which indicates that it was a temporary issue as to why the email could not be delivered.

    So in your instance, you could send out an email blast, and then track the bounces on your mail server. By looking at each bounce and the respective DSN code, you can flag whether an account’s email is valid or not (we used PHP to gain access to the mail server and parse the bounce notifications for the DSN codes)

    Here is more information on DSN codes.

    — Edit —

    As Dagon wisely mentioned, you can pipe bounced emails into a PHP script upon their receipt. To do this you will need to read up on your mailserver config, but ours looks similar to the following:

    bouncehandler   unix    -       n       n       -       -       pipe
    user=nobody argv=/usr/bin/php /path/to/BounceHandler.php
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: MySQL check if a table exists without throwing an exception I have
Possible Duplicate: Validate email address in Javascript? I have javascript for email validation :
Possible Duplicate: How to check if an array value exists I have a problem
Possible Duplicate: Faster DirectoryExists function? I want to check if some file exists on
Possible Duplicate: Check if access table exists I'm new to vba macros. Any idea
Possible Duplicate: PHP: Check who had read sent email? I'm writing a tool in
Possible Duplicate: how to check users leave a page For example when somebody refreshes,
Possible Duplicate: Check of specific radio button is checked I have these 2 radio
Possible Duplicate: Check if all items are the same in a List I have
Possible Duplicate: JQuery to check for duplicate ids in a DOM Suppose i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.