一封邮件可以包含不同的块,例如:
--0016e68deb06b58acf04897c624e
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
content_1
...
--0016e68deb06b58acf04897c624e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
content_2
... and so on
我该如何使用Python获取每个块的内容?
还有,如何获取每个块的属性?(例如content-type等)
part.get_payload()
时,数据以字节格式呈现,而我不知道如何将Excel(.xlsx)文件保存到变量中。 - Durga Gaddam