As jeyroz said, Email::Valid is a good tool for a quick and dirty check. However, there's one more thing that you can do. Here's a quick snippet from a conversation with an e-mail server:
So, at this point you can break the connection knowing you have a valid user. Here's the same conversation, slightly modified:[tex@smtp-client ~]$ telnet smtp-server.example.com 25 Trying xxx.xx.xxx.x... Connected to smtp-server.example.com Escape character is '^]'. MAIL FROM: <user@smtp-client.example.com> 250 Ok RCPT TO: <valid-user@smtp-server.example.com> 250 Ok
So, if you write a program that speaks SMTP well, you can check a mail server for valid users without actually sending an e-mail. There's no guarantee that the server won't bounce the message after accepting it, but this just shows another trick beyond just using Email::Valid.[tex@smtp-client ~]$ telnet smtp-server.example.com 25 Trying xxx.xx.xxx.x... Connected to smtp-server.example.com Escape character is '^]'. MAIL FROM: <user@smtp-client.example.com> 250 Ok RCPT TO: <invalid@bioinformatics.rit.edu> 450 <invalid@bioinformatics.rit.edu>: Recipient address rejected: User + unknown in local recipient table
In reply to Re: Finding if email addresses exist?
by biosysadmin
in thread Finding if email addresses exist?
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |