Il 23/08/2021 13:12, Loris Bennett ha scritto:
Jon Ribbens <jon+use...@unequivocal.eu> writes:

On 2021-08-23, Loris Bennett <loris.benn...@fu-berlin.de> wrote:
If instead of

   mail.set_content(body)

I do

   mail.set_content(body, cte="quoted-printable")

Try print(mail.get_content()) rather than print(mail.as_string())

That did the trick - thanks!

Cheers,

Loris



If you also want to know about the text, then that is probably utf8
encoded and converted to base64:

from base64 import b64decode

coded=(b'RGVhciBEci4gQmVubmV0dCwKCkJsb3JwISBCbGVlcCEKCgotLQpNYWlsYm90IEl'
       b'uYy4KMDEwMTAxIEJvdCBCb3VsZXZhcmQKQm90aGFtIENpdHkKQsO2dGxhbmQK')

uncoded = b64decode(coded).decode('utf8')
print(uncoded)

output:

Dear Dr. Bennett,

Blorp! Bleep!


--
Mailbot Inc.
010101 Bot Boulevard
Botham City
Bötland
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to