smtp mail with attachment
sandipan at vsnl.com
Tue Feb 6 15:35:10 CET 2001
AFAIK, and I could be ignorant, but you just have to construct the mail with
With content-type as multi-part (because the email will have more than one
part (itself) - the attachment(s))
And then, in one of the parts, put in the attachment after declaring its
Please note that if you are going to need to send binary attachments, base64
will come in use to encode it first. As in:
You can use smtplib to send the mime you have built then.
Also, you can have other parts of the email refer to this attachment by
giving it an identifier (URL sort of)
Works fine on both Unix and Windows.
----- Original Message -----
From: "Scott Hathaway" <slhath at home.com.nospam>
To: <python-list at python.org>
Sent: Tuesday, February 06, 2001 7:07 PM
Subject: smtp mail with attachment
> How do I send an email with an attachment with python (I need a cross
> platform solution for Windows and Unix)?
More information about the Python-list