email syntax validation needed
Markus Gaelli
gaelli at emergent.de
Sun Jun 15 10:08:40 UTC 2003
Am Sonntag, 15.06.03 um 10:52 Uhr schrieb Chris Burkert:
> Derek Brans wrote:
>> Does anyone have code (or is there any in the image) which, given a
>> string, returns whether or not that string is a syntactically valid
>> email address?
>
> I have no code but ...
>
> 1. You could ask DNS (that could take up to some minutes) if it really
> exists. (check for MX, RR or A)
> 2. If you have the RePlugin installed you could test if it is a
> regular address, but is doesn't have to exist.
> 3. You could use the messages of String
> 4. There are several Open Source or Implementations in other Languages
> like Class Mail_RFC822 of Pear (pear.php.net)
>
5. or you could
- install SmaCC, the Smalltalk Compiler Compiler available from
SqueakMap
- transform the necessary parts for email address grammar rfc822 from
http://www.faqs.org/rfcs/rfc822.html to SmaCC-standards
- and create a native smalltalk email-address-parser.
Markus
More information about the Squeak-dev
mailing list
|