martinrusev / imbox

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

Update parser.py #192

Closed ghost closed 4 years ago

ghost commented 4 years ago

Construct the filename of the attachment correctly if the filename a) uses the encoding defined in RFC 5987 (filename* instead of filename) b) and it is sort therefore no needed to break up into smaller units that are amenable to line wrapping (Parameter Value Continuations defined in RFC2184).

For example: Content-Disposition: attachment; filename*=UTF-8''%C3%A9%6B%65%7A%65%74%65%73