Email attachment problem
- by Alan Harris-Reid
Hi there,
I want to send an email with an attachment using the following code (Python 3.1)
(greatly simplified to show the example)
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
msg = MIMEMultipart()
msg['From'] = from_addr
msg['To'] = to_addr
msg['Subject'] = subject
msg.attach(MIMEText(body))
fp =…