更新时间:2023-12-02 22:57:22
我改了
self.message.attach(body) #In the class email constructor
到
self.message.attach(self.body) #In the class email constructor
它奏效了.
我将字符串类型附加到消息而不是 MIMEText
I was attaching string type to message instead of MIMEText