March 2003
Intermediate to advanced
656 pages
39h 30m
English
MIMEText
class MIMEText(_text,_subtype='plain',_charset='us-ascii',_encoder=None)
Packs text string _text as the payload of
a message of MIME type
'text/
_subtype'
with the given charset. When
_encoder is None,
MIMEText does not encode the text, which is
generally optimal. Otherwise, _encoder
must be callable with one parameter m, the
message being constructed; _encoder must
then call m
.get_payload( ) to get the payload, encode the payload, put the encoded
form back by calling
m
.set_payload, and set
m
['Content-Transfer-Encoding']
appropriately.
Read now
Unlock full access