php-imap
php-imap copied to clipboard
Part parse does not work when attachment names are in name* ja filename* headers
Part::parse() cannot parse attachment name when headers contain filename in following format:
Content-Type: application/octet-stream;
name*=UTF-8''ReturnForm%20Sein%C3%A4joki.doc
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename*=UTF-8''ReturnForm%20Sein%C3%A4joki.doc
Attachment name should be "ReturnForm Seinäjoki.doc". Currently parsed name is "undefined".
Content-Disposition spec says following:
The parameters "filename" and "filename*" differ only in that "filename*" uses the encoding defined in [RFC5987], allowing the use of characters not present in the ISO-8859-1 character set ([ISO-8859-1]).
Hi @TeroJarvinen , many thanks for your report. How would you suggest to implement this?
Please feel free to push a pull request.
Best regards & happy coding,
Please update to v5.1 and give it another try. If you are currently using an older version below v5.0, please read the breaking changes leading up to v5.1 before upgrading.
Best regards,