From nicholas.cole at gmail.com Sun Oct 2 09:45:52 2011 From: nicholas.cole at gmail.com (Nicholas Cole) Date: Sun, 2 Oct 2011 08:45:52 +0100 Subject: [Email-SIG] Splitting a list of addresses Message-ID: 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. From cs at zip.com.au Sun Oct 2 09:57:20 2011 From: cs at zip.com.au (Cameron Simpson) Date: Sun, 2 Oct 2011 18:57:20 +1100 Subject: [Email-SIG] Splitting a list of addresses In-Reply-To: References: Message-ID: <20111002075720.GA24656@cskk.homeip.net> On 02Oct2011 08:45, Nicholas Cole 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 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