[python-win32] Failing to email large attachment with Python on Windows XP

Tim Roberts timr at probo.com
Wed Feb 13 18:48:42 CET 2013


newtechnologybooks wrote:
>
>
> I'm struggling with sending a 100mb text file using Python running on
> a Windows XP client.
>

I do not doubt it.  Most SMTP servers block attachments that large.


> I was able to deliver 20mb files with this script, but failed when
> trying 100mb files.

That's further evidence that you have hit a server limit.  If you want
to send 100MB files, you store them on an FTP server or a web server and
send a link.  Companies do not want 100MB attachments clogging up their
mail pipe and bulking up their mail store.


> It seems the code runs smoothly when I'm removing this line which
> encoded the part as base64:
>
> Encoders.encode_base64(part)
>

That increases the size of the attachment by another 33%.

 
>
> I've notice the problem only occurs on my Windows XP, cause I was able
> to use the same code for delivering a 100mb file on a Windows 7 client.
>

To the EXACT SAME SERVER?  Or were you testing a different server?

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list