use standard file-like methods to detect the attachment size since in Python 2.5 the file was a `cStringIO` object which does not have a `len` property (fixes #4311 thanks to thatch for the patch)
Authored by: mgood 2006-12-15
Parent: [r4458]
Child: [r4460]