Name
MIMEText
Synopsis
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.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.