Quantcast

Splitting a list of addresses

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Splitting a list of addresses

Nicholas Cole
Dear Email Group,

Given a string containing a list of addresses separated by a comma,
such as one might find in a 'CC' field,  email.utils.parseaddr
correctly parses the first address and then silently ignores all of
the following ones.  Could a version of that function be put into the
library that returned a tuple of tuples, rather than just dropping the
additional information?

Best wishes,

N.
_______________________________________________
Email-SIG mailing list
[hidden email]
Your options: http://mail.python.org/mailman/options/email-sig/lists%40nabble.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Splitting a list of addresses

Cameron Simpson
On 02Oct2011 08:45, Nicholas Cole <[hidden email]> wrote:
| Given a string containing a list of addresses separated by a comma,
| such as one might find in a 'CC' field,  email.utils.parseaddr
| correctly parses the first address and then silently ignores all of
| the following ones.  Could a version of that function be put into the
| library that returned a tuple of tuples, rather than just dropping the
| additional information?

What, like this?

  http://docs.python.org/library/email.util.html#email.utils.getaddresses

That's exactly what you want, I think.
--
Cameron Simpson <[hidden email]> DoD#743
http://www.cskk.ezoshosting.com/cs/

No one's jumped off  the top of the [Windows] building here, so I guess
that's a pretty good indicator that it can't be all that bad.
        - Rob Bennett, Microsoft group product manager on Windows 98
_______________________________________________
Email-SIG mailing list
[hidden email]
Your options: http://mail.python.org/mailman/options/email-sig/lists%40nabble.com
Loading...