Does the user exist? How?

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
gzox
Forum Newbie
Posts: 8
Joined: Mon Jul 16, 2007 2:58 am

Does the user exist? How?

Post by gzox »

I have huge email list, but most emails do not exist anymore.

I wish to check which emails exist and which don't.

I do not want to send messages and receive bounced returned emails messages.
I only want to ask mail server on some way if user exist.
If exists I receive that information and brake down send process (I do not want to send email if user exist).

Can you help me please?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Does the user exist? How?

Post by Chris Corbyn »

You'll have a hard time doing this reliably. Historically servers accepts a "VRFY" command that would tell you if the user exists... but spammer loved this, so it no longer works!

Your best best is to try catching the bounces by opening the mailbox they go to ($message->setReturnPath()) and parsing the emails...

http://php.net/imap
Post Reply