def GetAllHeaders(message, name):
 for header_line in message.getallmatchingheaders(name):
  (yield header_line.split(':', 1)[1].strip())

def GetAllHeaders ( message , name ) : for header_line in message . getallmatchingheaders ( name ) : ( yield header_line . split ( ':' , 1 ) [ 1 ] . strip ( ) )
get all headers of a given name in a message .