attach a pdf file to an email

Larry Bates larry.bates at websafe.com
Mon Dec 19 15:08:16 CET 2005


nonamehkg at hotmail.com wrote:
> Hi, I am writing a simple program that sends emails with attachments.
> 
> I could use "MIMEImage" for .png and then attach it to an
> "MIMEMultipart" object. But I couldn't or don't know how to attachment
> a .pdf or something else to my emails.
> 
> I'm new to python, could somebody help me about that?
> 
> 
> Thank You,
> 
> 
> kychan
> 

Here is a great helper class that I have used for several
years.  I didn't write it, but it has worked fine.  Even if
you want to write your own, it should help as a guide.

http://motion.sourceforge.net/related/send_jpg.py

Larry Bates



More information about the Python-list mailing list