(msg)
Encode the message's payload in Base64.

    Also, add an appropriate Content-Transfer-Encoding header.
Encode the message's payload in Base64.
Encode the message s payload in Base64 .
def encode_base64(msg):
    """Encode the message's payload in Base64.

    Also, add an appropriate Content-Transfer-Encoding header.
    """
    orig = msg.get_payload(decode=True)
    encdata = str(_bencode(orig), 'ascii')
    msg.set_payload(encdata)
    msg['Content-Transfer-Encoding'] = 'base64'
def encode_base64 ( msg ) : orig = msg . get_payload ( decode = True ) encdata = str ( _bencode ( orig ) , 'ascii' ) msg . set_payload ( encdata ) msg [ 'Content-Transfer-Encoding' ] = 'base64'