Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getFilename() returns NULL for long attachment filenames #534

Open
pporlan opened this issue Mar 11, 2022 · 0 comments
Open

getFilename() returns NULL for long attachment filenames #534

pporlan opened this issue Mar 11, 2022 · 0 comments
Labels

Comments

@pporlan
Copy link

pporlan commented Mar 11, 2022

Q A
ddeboer/imap version 1.12.2 / 1.13.1
PHP version 7.4.28 / 8.1.3
IMAP provider imap.ionos.es

Summary

Long filenames splitted across multiple lines in the message are not retrieved correctly by the function $attachment->getFilename()

$message->getRawMessage() output:
...
--=_6cc5e393f9284e5e531157803beddb81
Content-Transfer-Encoding: base64
Content-Type: text/csv;
name*0*=utf-8''BTP%20Cerrados%20%C3%9Altimo%20Mes%20Tickets-20220311-0603;
name*1*=03.csv
Content-Disposition: attachment;
filename*0*=utf-8''BTP%20Cerrados%20%C3%9Altimo%20Mes%20Tickets-20220311-;
filename*1*=060303.csv;
size=247245

77u/Ik7Dum1lcm8gZGUgVGlja2V0IjsiRmVjaGEgZGUgY3JlYWNpw7NuIjtBc3VudG87RGU7IkRl
...

Current behavior

$attachment->getFilename() returns NULL

Expected behavior

$attachment->getFilename() should return "BTP Cerrados Último Mes Tickets-20220311-060303.csv"

@pporlan pporlan added the bug label Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant