how to get size of email attachment

Peter Hansen peter at engcorp.com
Mon Aug 30 15:56:08 EDT 2004


Joh wrote:

> i'm looking for a way to get total size of an email (with its attached
> files) using library such as poplib, or ?
> 
> can someone help me or give me an url from where to start ?

Looking in the docs for poplib, I found this: 
http://docs.python.org/lib/pop3-objects.html

It describes how using .list() should provide you with results in
the form (response, ['mesg_num octets', ...]).  The word "octets"
here refers to the number of bytes, essentially, in each message.

-Peter



More information about the Python-list mailing list