-
Notifications
You must be signed in to change notification settings - Fork 459
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
The attachments in the mail I received cannot be displayed, including pictures. Why does the name of the file saved locally end in .bin? #622
Comments
Since multiple emails could contain the same email attachment, all locally saved files get a random file name plus the suffix There is an open pull request to also support the original file name: #589 (still waiting for feedback from the author) Why are you replacing all $mailcontent = str_replace('cid:',"/email_file/",$mailcontent); These To be able to better help you: How does your output currently look like and how do you expect it to look like? |
My problem now is that pictures and attachments cannot be displayed in emails, so I use “str_replace()“ to replace my picture address. I tried to modify the save file address and name in "downloadAttachment", and put the pictures and attachments in a fixed folder "/public/email_file". If I don’t do this, how can I call the binary file.bin in my email and display it in my email. In the content? I am very anxious now, I am in Zhengzhou, China, waiting for your reply online.Thank you! |
This is my email number: sunnyzss928@qq.com .We can communicate in time via email. |
The php-imap version I currently use is 3.1.0 |
I guess I've understood your use-case and the problem. I think, you need to wait until this change has been implemented: #589 This will result in the identical file names, which are referenced in the email content. |
ok ,I used php 7.3 and php-imap 4.2.1, and the pictures can be displayed in the email. |
The |
The support for the original filename is included in the release 4.3.0 and newer. Let us know, if this helps to solve your use case here or if still need any further support. Closing this issue for now. Feel free to comment or re-open it. |
The attachments in the mail I received cannot be displayed, including pictures.
Why does the name of the file saved locally end in .bin?
$fileSysName = \bin2hex(\random_bytes(16)).'.bin'; $filePath = $attachmentsDir.DIRECTORY_SEPARATOR.$fileSysName;
Why did the ending become .bin? Pictures and attachments can't be displayed in my email details, only text.
Below is my code for calling php-imap:
The text was updated successfully, but these errors were encountered: