Python rfc822 Functions

EditRocket provides the following information on rfc822 functions in the Python source code builder.

dump_address_pair(pair) - The inverse of parseaddr(), this takes a 2-tuple of the form (realname, email_address) and returns the string value suitable for a To: or Cc: header.

mktime_tz(tuple) - Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp.

parseaddr(address) - Parse address, which should be the value of some address-containing field such as To: or Cc:, into its constituent ``realname'' and ``email address'' parts.

parsedate(date) - Attempts to parse a date

parsedate_tz(date) - Performs the same function as parsedate(), but returns either None or a 10-tuple; the first 9 elements make up a tuple that can be passed directly to time.

quote(str) - Return a new string with backslashes in str replaced by two backslashes and double quotes replaced by backslash-double quote.

unquote(str) - Return a new string which is an unquoted version of str.