in reply to Finding if email addresses exist?
Edit: I stand corrected. Don't do this, see explanation below. Thanks to all of the wise and cordial monks who have shown me the light on this topic, I could have very easily been flamed for making an unwise suggestion. :)
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Finding if email addresses exist?
by merlyn (Sage) on Jun 21, 2005 at 01:11 UTC | |
Re^2: Finding if email addresses exist?
by devnul (Monk) on Jun 21, 2005 at 01:51 UTC | |
Re^2: Finding if email addresses exist?
by mikeraz (Friar) on Jun 21, 2005 at 03:25 UTC | |
by ww (Archbishop) on Jun 21, 2005 at 15:27 UTC | |
by mikeraz (Friar) on Jun 23, 2005 at 03:50 UTC |
In Section
Seekers of Perl Wisdom