-
Notifications
You must be signed in to change notification settings - Fork 461
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
[BUG] Truncated Attachment Names Resulting in Lost File Extensions #724
Labels
needs investigation
This will be tested / debugged or checked out.
Comments
SirAlyon
added
the
needs investigation
This will be tested / debugged or checked out.
label
May 9, 2024
Hi, I'm facing a similar problem. Does it seem to me that the problem is on the sender's side?
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
PHP IMAP version: 5.0.1
PHP Version: 8.1.2-1ubuntu2.17 (cli)
Type of execution: CLI
Describe the bug
When processing emails with attachments through the PHP IMAP library, attachment names that are long and contain spaces are truncated. This results in filenames losing their extensions, which complicates file handling and can lead to potential data loss. This issue necessitates manual intervention to determine and append the correct file extensions.
To Reproduce
Steps to reproduce the behavior:
Configure an IMAP connection using the Mailbox class.
Fetch emails with attachments that have long names including spaces.
Observe that the fetched attachment names are truncated and missing extensions.
The used code:
Expected behavior
I expect that attachment names should be fully preserved, including spaces and their full length, without truncation. This would allow for accurate file handling and prevent the risk of data loss due to incorrect or missing file extensions.
Additional context
This issue occurs only with certain emails that have attachments with particularly long names. The problem seems to be related to how the IMAP server or the PHP IMAP library handles or parses attachment headers.
Thank you for your attention to this matter. I appreciate any assistance you can provide in resolving this issue, and I am available for further details or to assist with testing solutions. :)
The text was updated successfully, but these errors were encountered: