Re: parsing long `To' and 'Cc' from email

2007-09-06 Thread Steve Holden
Gerardo Herzig wrote: > Steve Holden wrote: [...] >>> >> Have you tried using email.utils.getaddresses()? >> >> regards >> Steve >> >> > No, i was not. And it works just perfect! One day i will make a hard > question!! I wonder why this getaddresess() function is not a method > into the Header

Re: parsing long `To' and 'Cc' from email

2007-09-06 Thread Gerardo Herzig
Steve Holden wrote: >Gerardo Herzig wrote: > > >>Hi all. Im trying to develop yet another email filter. Just for fun for >>now. Im having a little trouble parsing long 'To' and 'Cc' headers. >>Sometimes p.e. the 'To' header comes like >> >>'[EMAIL PROTECTED], [EMAIL PROTECTED]' >>others comes

Re: parsing long `To' and 'Cc' from email

2007-09-06 Thread Jonathan Gardner
On Sep 6, 1:25 pm, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > the email.* package dont seems to parse that kind of headers > `correctly'. What i want is to get a list with all the email address in > the `To' header. > > Someone know if there is a more sofisticated parser for doing this? > If you'

Re: parsing long `To' and 'Cc' from email

2007-09-06 Thread Steve Holden
Gerardo Herzig wrote: > Hi all. Im trying to develop yet another email filter. Just for fun for > now. Im having a little trouble parsing long 'To' and 'Cc' headers. > Sometimes p.e. the 'To' header comes like > > '[EMAIL PROTECTED], [EMAIL PROTECTED]' > others comes like > '"My self" <[EMAIL PR

parsing long `To' and 'Cc' from email

2007-09-06 Thread Gerardo Herzig
Hi all. Im trying to develop yet another email filter. Just for fun for now. Im having a little trouble parsing long 'To' and 'Cc' headers. Sometimes p.e. the 'To' header comes like '[EMAIL PROTECTED], [EMAIL PROTECTED]' others comes like '"My self" <[EMAIL PROTECTED]>, "My brother" <[EMAIL PROT