def encode_quopri(msg):
 orig = msg.get_payload(decode=True)
 encdata = _qencode(orig)
 msg.set_payload(encdata)
 msg['Content-Transfer-Encoding'] = 'quoted-printable'

def encode_quopri ( msg ) : orig = msg . get_payload ( decode = True ) encdata = _qencode ( orig ) msg . set_payload ( encdata ) msg [ 'Content-Transfer-Encoding' ] = 'quoted-printable'
encode the messages payload in quoted-printable .