Method for parsing text Cc field of email header?
I have the plain text of a Cc header field that looks like so: friend@email.com, John Smith <john.smith@email.com>,"Smith, Jane" <jane.smith@uconn.edu> Are there any battle tested modules for parsing this properly? (bonus if it's in python! the email module just returns the raw text without any methods for splitting it, AFAIK) (also bonus if it splits name and address into to fields) Martin Tournoij There are a bunch of function available as a standard python module, but I think you're looking for email.utils.parseaddr() or email.utils.getaddresses() >>> addresses = 'friend@email.com, John