SMTPlib Emailing Attachments

Bill bblancett at hotmail.com
Fri Sep 19 17:33:05 EDT 2003


Karl Scalet <news at yebu.de> wrote in message news:<bkf0nd$10dm0$1 at ID-141451.news.uni-berlin.de>...
> Bill wrote:
> 
> > [...]
> > path = 'C:\\YourPath\\YourFile.txt'
> > filename = 'YourFile.txt'
> 
> is this correct? Shouldn't path contain the directory only?
> Otherwise what's the content of YourFile.txt then.
> 
> Karl

Well I believe you need the file as well b/c the mimetypes function
checks the extension to see what type of file it is. I am sure you can
modify it to be more efficient. But it works as is.




More information about the Python-list mailing list