smtp mail with attachment

Grant Edwards grante at visi.com
Fri Feb 9 16:23:45 EST 2001


In article <95p1o9$3rp$1 at nnrp1.deja.com>, Mark Pilgrim wrote:

>> How do I send an email with an attachment with python (I need a cross
>> platform solution for Windows and Unix)?
>
>Found this on the Python Knowledge Base (a wonderful resource, if you
>don't know about it):
>http://www.faqts.com/knowledge_base/view.phtml/aid/3992/fid/380
>
>The post references a script available via FTP, but the URL is no
>longer valid; here is the correct URL:
>ftp://ftp.visi.com/users/grante/python/mfetch.py
>
>The script contains some Windows-specific stuff, but I believe the
>class you want (SMTPWriter) is cross-platform.

The SMTPWriter class was developed on Linux, and should work on
any system which supports smtplib and MimeWriter.  It's
basically just a wrapper around those two modules.

The other stuff in that script uses Microsoft COM/MAPI and only
runs under Windows, but it's concerned with fetching messages
from Exchange Server.

-- 
Grant Edwards                   grante             Yow!  I have a TINY BOWL in
                                  at               my HEAD
                               visi.com            



More information about the Python-list mailing list