martinrusev / imbox

Python IMAP for Human beings
MIT License
1.18k stars 188 forks source link

Attachment parsing error #234

Open leonlinxs opened 1 year ago

leonlinxs commented 1 year ago

I use another Python module [yagmail] to send an email with attachments. When I try to use the imbox module to read the email attachments sent by yagmail, the following error appears, which looks like an attachment name resolution error:

File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/imbox/parser.py", line 212, in parse email attachment = parse attachment(part) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/imbox/parser.py", line 122, in parse attachment filename parts. insert(int(s_name[1]),value[1:-1] if value. startswith('"') else value) ValueError: invalid literal for int() with base 10: ''mmexport1670496727397.jpg