According to the documentation for Net::SMTP (take the link to CPAN), the recipients() method can return an array of addresses that succeeded, if you pass the hash slice ( SkipBad => "true" ). Otherwise, it will return an error.
This may not mean that the address is valid, however, just that the server cannot send to that address. | [reply] |
If the server is an esmtp server, you can issue commands link VRFY. There is also another command that you can use. I think it's EXPN or something like that. At any rate, you should be on to a good start. The VRFY command is used to verify that an email address is configured for delivery at said host. | [reply] |
Problem with that is that VRFY and EXPN can both be turned off by the server admin, so all you can really say is that the address doesn't appear to be deliverable if these methods fail.
| [reply] |
Well the thing is, I admin the box that these scripts run on, and this host sends out a good 200,300 e-mails a week, So I get flooded with bogus e-mail warnings from sendmail. And I want someway for the scripts to go "oh, this is a bad address" and mark the user db with the info. | [reply] |