-
Notifications
You must be signed in to change notification settings - Fork 262
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
when forwarding mail, only first attachment is sent, all subsequent ones are 0 bytes #6064
Comments
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@GretaD you +1'd. Are you able to reproduce? |
yes, i can. I dont remember seeing any error. But i can try to reproduce it again |
I think it's bug in buildAttachmentsPartsQuery in buildAttachmentsPartsQuery When getRawAttachments tries to get second attachment from source letter, buildAttachmentsPartsQuery returns array with empty first element (or several preceding empty elements if letter has more than two attachments). Temporary fixed this on own installation with |
Very interesting, thanks for taking a look! |
I faced this problem from the other side. I opened the email containing the attachment and tried to forward it. I tried to fix the frontend, but it looks like this alone will not do. Through the "corrected frontend" I received a visualization of email attachments (forwarded email). Next - I forward them and lo and behold - the letter arrives and there are attachments in it! Only something is wrong: the icons are not the same. The pdf has an archive icon. Аnd the I decided to dig deeper ... As a result, what I managed to dig up : =)
In general, as a temporary measure, I shoved mailboxId into each attachment in the getBody method and while my crutches are working ... =) actually, it may be useful at least a little... - sazanof@e7eb3ce Can I add the necessary fields (mailboxId at least) to the local message table? I don't know what this monologue is about - I don't know if you already have ways to solve the problem, whether you are aware of the situation or not. And I would not really like to go separately with your approach. I could organize a normal pullrequest, but maybe we need to discuss it first... Thank you for finishing reading! =) |
I'm not sure that this is actually what's happening. Lines 124 to 136 in ef0c005
The $uid is (confusingly named) the user id.
What could be happening is that the frontend is sending the wrong ID for the attachment. Can you take a look at the request to see if your 'messageId'' value is actually valid? Thanks :) |
Yes, everything is correct in the So, I tried to reproduce the problem again and that I understood (at least tried)
the wrong data is being transmitted ($mailbox->getName() from messageId in attachment is an identifier on the imap server, which is unique only if the correct folder (mailbox id) is added to it. for an attachment, the messageId is not equal to the id of the message in the database I hope I didn't bore or confuse you too much =). Have a nice day! |
Sounds similar to #5602. |
Anna and I did an investigation: 1.We set mail/lib/Model/IMAPMessage.php Line 404 in a96e8d5
However, our code expects it to be the database id.
Solution: Overwrite 2.Our frontend does not pass the attachments when preparing a reply/forward. Add attachments: original.attachments, to Line 288 in a96e8d5
|
Thanks everyone for all the feedback 👍 I think we have more than one issue here 🙈
|
Fixed with v1.12.6 / v1.13.4 |
Steps to reproduce
Expected behavior
all attachments must be forwarded
Actual behavior
second and subsequent attachments are not sent, empty file is sent instead:
Content-Type: application/x-empty; name=photo.jpg
Content-Disposition: attachment; filename=photo.jpg
Content-Transfer-Encoding: base64
Mail app version
1.11.7
Mailserver or service
No response
Operating system
Debian
PHP engine version
PHP 8.1
Web server
Nginx
Database
MySQL
Additional info
when forwarding from mail client everything works.
The text was updated successfully, but these errors were encountered: