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

newtechnologybooks newtechnologybooks at gmail.com
Thu Feb 14 07:37:42 CET 2013


[python-win32] Failing to email large attachment with Python on Windows XP*Tim
Roberts* timr at probo.com
<https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=python-win32%40python.org&su=Re%3A%20%5Bpython-win32%5D%20Failing%20to%20email%20large%20attachment%20with%20Python%20on%0A%20Windows%20XP&In-Reply-To=%3C511BD1FA.7010700%40probo.com%3E>
*Wed Feb 13 18:48:42 CET 2013*


   - Previous message: [python-win32] Failing to email large attachment
   with Python on Windows
XP<http://mail.python.org/pipermail/python-win32/2013-February/012717.html>
   - *Messages sorted by:* [ date
]<http://mail.python.org/pipermail/python-win32/2013-February/date.html#12718>
    [ thread ]<http://mail.python.org/pipermail/python-win32/2013-February/thread.html#12718>
    [ subject ]<http://mail.python.org/pipermail/python-win32/2013-February/subject.html#12718>
    [ author ]<http://mail.python.org/pipermail/python-win32/2013-February/author.html#12718>


------------------------------

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.

Basically, I agree, but I'm using the Python SMTP server that does not
limit the payload size.

>* 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.

On my network sniffer I don't see any evidence that the code has start
sending any kind of data to the sever, it just hang for a few seconds
till the client send a FIN flagged packet to the server.


I agree that it's is not a common use case for, but my code is used
for testing a flow that works with our corporate clients (and the
client does not experience any errors when sending such a large
files).


>* 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%.

That's true, but then again I do not have any limitation on the
corporate server size, nor on the Python test server.


>**>* 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?

I've tried the same code with 3 different servers and got the same
results of the client dropping the connection before trying to send a
single byte of data.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20130214/d9ce76ba/attachment.html>


More information about the python-win32 mailing list