PyDocs

Nav

Internet Data Handling

Header.append

  • Header.append(s, charset=None, errors='strict')
Append a string to the MIME header.

Optional charset, if given, should be a Charset instance or the name
of a character set (which will be converted to a Charset instance).  A
value of None (the default) means that the charset given in the
constructor is used.

s may be a byte string or a string.  If it is a byte string
(i.e. isinstance(s, str) is false), then charset is the encoding of
that byte string, and a UnicodeError will be raised if the string
cannot be decoded with that charset.  If s is a string, then
charset is a hint specifying the character set of the characters in
the string.  In either case, when producing an RFC 2822 compliant
header using RFC 2047 rules, the string will be encoded using the
output codec of the charset.  If the string cannot be encoded to the
output codec, a UnicodeError will be raised.

Optional 'errors' is passed as the errors argument to the decode
call if s is a byte string.
0 Examples
No examples for email.header/Header.append.
See Also
No see-alsos for email.header/Header.append
0 Notes
No notes for Header.append