[Zope] Re: Email address validator?

Chris McDonough chrism@zope.com
Sat, 24 Nov 2001 18:43:11 -0500


I've successfully used in Python the ridiculous (6598 byte) regex to
match email addresses that Jeffrey Friedl presents in "Mastering
Regular Expressions".  It's available as an example here:
http://public.yahoo.com/~jfriedl/regex/code.html

----- Original Message -----
From: "Bruce Eckel" <Bruce@EckelObjects.com>
To: <hohoff@rz.uni-potsdam.de>; <zope@zope.org>
Cc: <ecofsky@theUNIXman.com>; <chrism@digicool.com>
Sent: Saturday, November 24, 2001 10:48 AM
Subject: Email address validator?


> Worked like a charm! It turns out I was handing it an invalid
> "from" email address.
>
> Which brings up another question -- is there a piece of code that
> will validate email addresses somewhere? Seems like it would be a
> common tool (I'll bet the spammers have it!).
>
> *********** REPLY SEPARATOR  ***********
>
> On 11/24/01 at 11:10 AM Holger Hoffmann wrote:
>
> >Hi,
> >
> >Bruce Eckel wrote:
> >>
> >> Maybe there's a better way to do this.
> >>
> >> How about this: can I use the Zope "MailHost" object from within
> an
> >> external method to send mail?
> >
> >yes, the interface is described in the API Reference of
> >the Zope Book:
> >
> >  http://www.zope.org/Members/michel/ZB/AppendixB.dtml
> >
> >Use it like:
> >
> >subject = "E-Mail Subject"
> >mto = "zope@zope.org"
> >mfrom = "hohoff@rz.uni-potsdam.de"
> >message = """To: zope@zope.org
> >
> >This is my E-Mail."""
> >
> >self.NameOfMailHostObject.send(message, mto, mfrom, subject)
> >
> >... Holger
>
>
>
> Most current information can be found at:
> http://www.mindview.net/Etc/notes.html
> ===================
> Bruce Eckel    http://www.BruceEckel.com
> Contains free electronic books: "Thinking in Java 2e" & "Thinking
> in C++ 2e"
> Please subscribe to my free newsletter -- just send any email to:
> join-eckel-oo-programming@earth.lyris.net
> My schedule can be found at:
> http://www.mindview.net/Calendar
> ===================
>
>
>