Closed xiconet closed 9 years ago
Could you give me a test case that fail ?
Running WindowsXP-sp3, python 2.7.6, no "resident" (scanning) antivirus
pip install pyzmail
PATH
includes C:\python27\scripts
where the pyzsendmail
script is located
using cmd.exe:
pyzsendmail -H smtp.free.fr -f me@free.fr -s test -t me@yahoo.fr -T :"testing pyzsendmail with torrent attachment" -a application/octet-stream:test_torrent:test.torrent
or:
pyzsendmail -H smtp.free.fr -f me@free.fr -s test -t me@yahoo.fr -T :"testing pyzsendmail with image attachment" -a image/jpeg:test_image:test.jpg
access yahoo mail using webclient, browser is Pale Moon 25.3.1 (x86) download attachments
test.torrent
is 96,1 kB, downloaded file:63,6 kB . Inspection in a text editor shows that the last ~1/3 of the file is missing. The remaining part seems intact.test.jpg
is 221 kB, downloaded file:only 740 B
This a bug ! Attachments are open in "text" mode on Windows platform. I have pushed a fix, but no new release yet. You can look at the fix and apply it yourself on your sources and see if it works better for you
https://github.com/aspineux/pyzmail/commit/a01570fd135f8428a548bf4317485ea1b878353c
Yes, problem fixed. I must have been been half asleep when I looked at your script. Thanks a lot for your help.
Sir,
Before all, thanks for your hard work in order to provide a more user-friendly email library. However I've made various attempts to send an attachment using the included
pyzsendmail
which have all proven unsuccessful. My files somehow got "corrupted" (they seem "tailed") when downloading them back. I tried bothapplication/x-bittorrent
andimage/jpg
types with similar results. I did inspect the code, but I still fail to see where the problem could lie. Note that I could send the very same files in similar conditions (sender=recipient=me, smtp server) without corruption, using python's "low level"email
andsmtplib
libs.Settings: WinXPsp3, python 2.7.6,
pyzmail
package installed with a "standard"pip
command.