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

Problem forwarding an email with jpg image attached received from iOS mail app #7414

Closed
SamsamM38 opened this issue Jun 3, 2020 · 12 comments

Comments

@SamsamM38
Copy link

I receive an email from iOS mail app containing a jpg image attached.
I can open the image, all works normally.
When I forward this email, the jpg image attached disappear, it not appear in body either.

All works fine if the file attached is something else like a pdf file.
Roundcube version : 1.4.5

@alecpl
Copy link
Member

alecpl commented Jun 3, 2020

Provide a sample message, please.

@SamsamM38
Copy link
Author

mail.txt

@alecpl
Copy link
Member

alecpl commented Jun 3, 2020

The attachment is marked as inline. I think we have already tickets for similar issues, but I'll leave it open. I hope to have time to work on these for 1.5.

Your workaround is to use "forward as attachment" feature.

@SamsamM38
Copy link
Author

Thank you

@SamsamM38
Copy link
Author

The question is : why the problem appear only with an email from iOS app mail ?

@alecpl
Copy link
Member

alecpl commented Jun 3, 2020

Most clients do not use Content-Disposition: inline on the image part for messages with a plain text body and an image attachment.

@SamsamM38
Copy link
Author

If I used the "forward as attachment" feature, a file attachment containing the email appear + the jpg image file that did not appear with the simple "forward" command.

So to summarize : forward command, jpg file disappear, "forward as attachment" jpg file appear.
Call Mulder and Scully !

@roberthr74
Copy link

We have the same issue using Rouncube Web client. Forward as attachment works in this case.

@tomsommer
Copy link
Contributor

We are also getting reports of this

@lucasmarin
Copy link
Contributor

@alecpl

The problem is at compose.inc:997

            if ($part->disposition == 'inline' && $part->mimetype != 'application/pdf') {
                if (!$bodyIsHtml) {
                    continue;
                }

                $idx = $part->content_id ? ('cid:' . $part->content_id) : $part->content_location;

                if ($idx && isset($CID_MAP[$idx]) && strpos($message_body, $CID_MAP[$idx]) !== false) {
                    $replace = $CID_MAP[$idx];
                }
                else {
                    continue;
                }
            }

I saw that code above was developed by issue #7122 and removing else condition on it fix the problem on this issue.

I will investigate it, fix on my RC locally and open a PR here.

Regards.

@alecpl
Copy link
Member

alecpl commented Jun 27, 2020

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants