Keep It Simple, Stupid | |
PerlMonks |
Re: Sendmail to non-working email addressby jdtoronto (Prior) |
on Sep 04, 2003 at 16:56 UTC ( [id://288919]=note: print w/replies, xml ) | Need Help?? |
Hi,
You should think of this the other way around. Validate the address before you attempt to send to it, that way you have some hope of catching the error early. There are a number of CPAN modules, I have used this one Mail::CheckUser very succesfully in several products. However, you should bear in mind that some of the larger ISP's do not reject at the SMTP connection, they receive the email, then send back a bounce message later. You really need to make the data persistent - ie, some session management and a database maybe - in order to ensure that you get valid email. In fact, depending on what you are doing, you should possibly accept the unverifiable email, then send an email with a non-trivial nonce requiring that they respond to it - maybe to a script - in order to be signed up for whatever it is.
In Section
Seekers of Perl Wisdom
|
|