On Mon, Aug 14, 2000 at 08:04:48PM -0300, martin langhoff wrote:
> Magnus Bodin wrote:
> > > Doesn't Mail::RFC822 have validation code? I thought it did.
> >
> > No, but Mail::Address [1]
> >
> > or
> >
> > RFC::RFC822::Address [2]
>
> are you sure? I've been looking at Mail::Address and found nothing in
> its code that hinted of ay validation. It looked like an 'address book'
> mechanism, that built objects with a human-readable name and an address,
> and provided a few functions on that. Not much more, and certainly not
> any validation I could see.
OK. I didn't check if it explicitly had a function called "validate" but I
checked the source of both these packages and both are able to _parse_ such
an address.
> as per `perldoc perlfaq9` there's no realiable way to tell a
> functioning email address from a functioning diesel engine until you
> actually send it.
You _can_ tell if it's well formed. But on the other hand, all these
addresses are valid:
%20 + [EMAIL PROTECTED] or alternatively "%20 + %20"@x42.com
"\@x42.com or alternatively "\"\\"@x42.com
at@at@[EMAIL PROTECTED] or alternatively "at@at@at"@x42.com
You can also do a MX check to see if there is a receiving party at all for
the domain mail.
What you cannot check is whether the receiving party likes the local part
(or accepts mail whatsoever, the MX may be misleading) or not.
/magnus
--
http://x42.com/