Chad Kellerman wrote:

> Hello again,
>   
>     I am using getOpts::Std, with a -e option where you have to emter in
> your email address.  How can I do checking on that address.  I am trying
> to verify the domain as well as the user.
> 
> Here is what I have but I don't know how to contiue:
> 
> <code>
> 
> getopts("d:s:e;h"); # colons take arguements
> my @authUsers = "bob, chuck, pam, lee, april";
> 
> if ($opt_e =~ /\@somedomain.com/) {
>      print "please use a valid somedomain.com email account\n";
>      exit;
> }elsif (    ) {
>      print "you are not a valid user for this program.  go away\n";
>      exit;
> }
> 
>    I am not sure if I can put a conditional statement for the elsif
> statement that would loop thru the @authUsers.  Or put it this way, I
> don't know how.  I am working on a linux system, the user and group
> permissions I am not worried about at this point in time, because I want
> to use the valid email address later.
> 
>    Can anyone point me in the right direction?  Not sure if I should
> change my @authusers to full valid email accounts and verify the whole
> account, or pieces like I am doing.
> 

you are not going to like the answer :-)

$perdoc -q 'address'

Found in /usr/lib/perl5/5.6.1/pod/perlfaq9.pod

       How do I check a valid mail address?

       You can't, at least, not in real time.  Bummer, eh?

       Without sending mail to the address and seeing whether
       there's a human on the other hand to answer you, you can­
       not determine whether a mail address is valid.  Even if
       you apply the mail header standard, you can have problems,
       because there are deliverable addresses that aren't
       RFC-822 (the mail header standard) compliant, and
       addresses that aren't deliverable which are compliant.

read through the rest of the doc

david

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to