0
votes

According to this article (section #V To send an email with attachment), I should be able to send an e-mail with attachement. However, I get the error,

 line 6, in <module>
  from email.MIMEMultipart import MIMEMultipart
  ImportError: No module named 'email.MIMEMultipart'

Any idea, how to solve this?

1

1 Answers

2
votes

The tutorial you're reading is for Python 2.x. In Python 3.x (which I assume is what you're using), I think you want this:

from email.mime.multipart import MIMEMultipart

See also the email.mime documentation.