ImportError: No module named mime.multipart

后端 未结 5 1191
醉酒成梦
醉酒成梦 2021-02-05 13:44

Good morning,

For testing purposes, I have made a one-line Python program:

from email.mime.multipart import MIMEMultipart

When I run it

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-05 13:58

    It should now be done like this:

    from email.mime.multipart import MIMEMultipart
    

    Same goes for other commonly used modules like MIMEText and MIMEBase (use .text and .base respectively).

提交回复
热议问题