Having solved this issue a time or three let me share some thoughts with you:
First off consider looking at Email::Valid. This module will do two things for you. First it will check to see if the address is well formed. Seondly it checks to see if there is a mail server for the domain part. Example:
--$ perl -MEmail::Valid printf "%s\n",(Email::Valid->address("peter\@berghold.net")?"Yes":"no" +); Yes --$ perl -MEmail::Valid printf "%s\n",(Email::Valid->address("peter@yuckster.com")?"Yes":"no") +; no --$ host yuckster.com yuckster.com has address 216.21.229.209 --$ host -tany yuckster.com yuckster.com name server dns21.register.com. yuckster.com name server dns22.register.com. yuckster.com has address 216.21.229.209
With that information in hand I can go to the next step in validating this user's email address.
Here is here I get really clever. (well... maybe not that clever..) First some assumptions:
http://my.server.com/cgi-bin/validate.cgi?key=oiweruojaklsdfklh&email= +dude@isp.com
Now you have validated that the email address is valid AND you have validated that it exists... Like it? There is more than one way to do this, but this is one of them.
| Peter L. Berghold -- Unix Professional Peter at Berghold dot Net | |
| Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice. | |
In reply to Re: Sendmail to non-working email address
by blue_cowdawg
in thread Sendmail to non-working email address
by true
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |