且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AttributeError: 'str' 对象没有属性 'policy'

更新时间: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