Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: How to send an email with an attached file ? (http://www.velocityreviews.com/forums/t318826-re-how-to-send-an-email-with-an-attached-file.html)

Graeme Matthew 06-25-2003 10:43 AM

Re: How to send an email with an attached file ?
 
use the email module

this handles all email including attachments etc

"Michel Combe" <combe.michel@9online.fr> wrote in message
news:bdbspj$p8nl3$1@ID-181365.news.dfncis.de...
> Hi all,
>
> I need to write a program to send an email with an attached ascii file.
>
> I tried the example using MIMEText given at
> http://www.python.org/doc/current/lib/email-simple.txt
> but this includes the ascii file *inside* the message. This is not what I
> want, I want it attached.
>
> I then tried the example using MIMEMultipart given at
> http://www.python.org/dev/doc/devel//lib/email-mime.txt
> but this example does not run on my system (Python 2.2.1 on Linux). I
> receive a message :
> ImportError: No module named MIMEMultipart
>
> Can someone help ?
> Thanks in advance
>
> Michel Combe
>





All times are GMT. The time now is 12:16 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.