vba/vb check if email address is send-able to

I am in need of some vb or vba code which would allow me to determine if an email address exists on the stated email domain.
I know how to validate the format of an address.
LVL 1
HalCHubAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ThomasMcA2Commented:
That's not possible, and I'm glad that it's not possible. Imagine the amount of SPAM you would get if a sender could test every possible email address until they found valid ones!
HalCHubAuthor Commented:
I know you are wrong because I do it in PHP
RayData AnalystCommented:
If you're doing this, then shed more light on "how" in PHP.  Not the code, but the concept.  

If you're talking about your own email domain, then sure you can.  However, if you're talking about any random email address at a domain you don't own, no you cant.  

You CAN send an email to an address and see if you get a bounce back, but that does not appear to be what you are asking.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

IrogSintaCommented:
I would have to disagree with the others here.  I know it can be done because I had one of my guys work on this same issue at our workplace.  You would have to download an API to be able to do this though and there is a fee if you want to do more than a certain amount of emails in a period of time.  Sorry that I can't give you the specifics on what he ended up using.  I just know that it could be done.  I believe it has something to do with querying a DNS MX record and then performing a "RCPT TO" command to test if this SMTP server accepts the email address.

Ron
RayData AnalystCommented:
Ron, that is soooo very close to being essentially the same as sending a message and testing for a bounce.
IrogSintaCommented:
Ray, maybe it is. Honestly, I'm not certain how these companies that do these real-time bulk email validations do it.  Here's a link below for one company that I'm not affiliated with that gives you an API and allows you to validate up to 1000 addresses each month for free.  If you need to validate a larger number, obviously there's a fee.
https://mailboxlayer.com/

Ron
RayData AnalystCommented:
Thanks for the Pointer Ron.
I emailed that company so I could learn something about what is really being done and here is the response I received . . . Unless Excel VBA can do smtp commands (not just send mail), I think the net answer is still "no" to the asked question.

Essentially, the mailboxlayer API verifies email addresses using SMTP (Simple Mail Transfer Protocol), which is the protocol we all use in order to send and receive emails. Very similar to pinging a URL to verify the existence of a web server, our API makes use of mail servers' SMTP conversations in order to determine whether or not a individual email address is actually allotted to a user.

Example: The API's "SMTP Check" will return "true" when validating your email address "xxxxxx@gmail.com". However, if you request validation of a wrong email address like "xxxxxxY@gmail.com", the validation result will be negative.

The clear advantage of this method of validation is that no actual emails have to be sent. A "bounce test" would very quickly result in our email validation servers being blacklisted due to spam regulations.

Please be aware that it is not possible to determine whether or not an email address is actually being used by the person who created it. However, when using our API to - for instance - validate the existence of an email address entered by a user during a registration process, it's valuable to know if that address can actually receive email, or not. Based on this knowledge you can make more informed decisions about email campaigns, registration restrictions, etc.
IrogSintaCommented:
Unless Excel VBA can do smtp commands (not just send mail), I think the net answer is still "no" to the asked question.
Ray, good job for emailing the company but in regards to the SMTP commands you mentioned, if they give you an API to download, this can be added as a Reference in your .Net project or your Excel VBA code references so I don't see any problem there.  Now if the question was whether it could be done natively without addons or additional libraries, then you're right; however, I don't see that in the question nor does it makes sense that someone working in .Net or VBA would limit themselves in this manner.

Ron
HalCHubAuthor Commented:
I've requested that this question be deleted for the following reason:

no one is answering the question they are going round and round with a discussion
IrogSintaCommented:
@HalCHub,
You may have missed this in the discussion, but if you follow the link I posted earlier, https://mailboxlayer.com/, and sign up for free, you will be able to download an API which you can use by adding a reference to your project or application.  They also provide documentation on how to use the API.  You could give this a shot and post if you have any problems getting it to work.  As I also mentioned, you are limited to 1000 emails per month for the free account so if you intend to verify more than this, then you will have to pay a subscription fee.

Ron

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.