def getaddrlist(self, name):
raw = []<EOL>for h in self.getallmatchingheaders(name):<EOL><INDENT>if h[<NUM_LIT:0>] in '<STR_LIT>':<EOL><INDENT>raw.append(h)<EOL><DEDENT>else:<EOL><INDENT>if raw:<EOL><INDENT>raw.append('<STR_LIT:U+002CU+0020>')<EOL><DEDENT>i = h.find('<STR_LIT::>')<EOL>if i > <NUM_LIT:0>:<EOL><INDENT>addr = h[i+<NUM_LIT:1>:]<EOL><DEDENT>raw.append(addr)<EOL><DEDENT><DEDENT>alladdrs = '<STR_LIT>'.join(raw)<EOL>a = AddressList(alladdrs)<EOL>return a.addresslist<EOL>
Get a list of addresses from a header.

        Retrieves a list of addresses from a header, where each address is a
        tuple as returned by getaddr().  Scans all named headers, so it works
        properly with multiple To: or Cc: headers for example.