[Zope] Email address validator?

Bruce Eckel Bruce@EckelObjects.com
Sat, 24 Nov 2001 07:48:17 -0800


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
===================