Hi there,
Using Python 3.1.2 I am having a problem sending binary attachment files
(jpeg, pdf, etc.) - MIMEText attachments work fine. The code in question
is as follows...
for file in self.attachments:
part = MIMEBase('application', "octet-stream")
part.set_payload(open(file,"rb").read()
Chris Rebert wrote:
On Thu, Apr 29, 2010 at 1:06 PM, Alan Harris-Reid
wrote:
Hi there,
I want to send an email with an attachment using the following code (running
under Python 3.1, greatly simplified to show example)
from email.mime.multipart import MIMEMultipart
from email.mime.text
On Thu, Apr 29, 2010 at 1:06 PM, Alan Harris-Reid
wrote:
> Hi there,
>
> I want to send an email with an attachment using the following code (running
> under Python 3.1, greatly simplified to show example)
>
> from email.mime.multipart import MIMEMultipart
> from email.mime.text import MIMETex
Hi there,
I want to send an email with an attachment using the following code
(running under Python 3.1, greatly simplified to show example)
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
msg = MIMEMultipart()
msg['From'] = from_addr
msg['To