email.contentmanager.ContentManager.get_content()

get_content(msg, *args, **kw)

Look up a handler function based on the mimetype of msg (see next paragraph), call it, passing through all arguments, and return the result of the call. The expectation is that the handler will extract the payload from msg and return an object that encodes information about the extracted data.

To find the handler, look for the following keys in the registry, stopping with the first one found:

  • the string representing the full MIME type (maintype/subtype)
  • the string representing the maintype
  • the empty string

If none of these keys produce a handler, raise a KeyError for the full MIME type.

doc_python
2016-10-07 17:32:21
Comments
Leave a Comment

Please login to continue.