Bugzilla@Mozdev – Bug 26434
forwarding email with embedded images removes images
Last modified: 2018-05-01 03:03:26
You need to log in before you can comment on or make changes to this bug.
Receiving an HTML email with embedded images load correctly in TB 52.4.0 (64-bit) on Linux. Replying to an email loads the embedded image and sending it works fine. Forwarding the email does not load the embedded images and if you send the email the email will not have the images embedded. Disabling the 'Apply the following template to the forwarded message' makes forwarding work correctly again with embedded images. The 'Quote Header' being used is the same for both Reply and Forwarding so that should not be the cause of the problem.
*** Bug 26519 has been marked as a duplicate of this bug. ***
Related Tb bug: https://bugzilla.mozilla.org/show_bug.cgi?id=820589
In both cases (reply + forward) are the errors for images reported, before ST4 runs its NotifyComposeBOdyReady event. However it is possible that the error events are either firing delayed or work on nodes that do not exist anymore. THr problem with asynchronous processes like this is that it is hard to tell when they are finished. At the moment I believe if I could wait with ST4 processing in the forward case the events might have enough time to fire and replace the images. REPLY CASE: Security Error: Content at moz-nullprincipal:{45c7389f-c115-4a97-ac20-7f2ca9624070} may not load or link to imap://seawonkey%40gmail%2Ecom@mail.gmail.com:993/fetch%3EUID%3E/INBOX%3E87?header=quotebody&part=1.2.2&filename=imacoljcadpngdic.png. Security Error: Content at moz-nullprincipal:{45c7389f-c115-4a97-ac20-7f2ca9624070} may not load or link to imap://seawonkey%40gmail%2Ecom@mail.gmail.com:993/fetch%3EUID%3E/INBOX%3E87?header=quotebody&part=1.2.3&filename=thunderbird_blog2.png. SmartTemplate4 14:47:13.498 [330 ms] NotifyComposeBodyReady SmartTemplate4 14:47:13.498 [0 ms] SmartTemplate4.notifyComposeBodyReady() SmartTemplate4 14:47:13.606 [108 ms] getLocale() returns: en-US FORWARD CASE: Security Error: Content at moz-nullprincipal:{2a7cdc5d-2f71-4d62-ae4e-df971708693f} may not load or link to imap://seawonkey%40gmail%2Ecom@mail.gmail.com:993/fetch%3EUID%3E/INBOX%3E87?part=1.2.2&filename=imacoljcadpngdic.png. Security Error: Content at moz-nullprincipal:{2a7cdc5d-2f71-4d62-ae4e-df971708693f} may not load or link to imap://seawonkey%40gmail%2Ecom@mail.gmail.com:993/fetch%3EUID%3E/INBOX%3E87?part=1.2.3&filename=thunderbird_blog2.png. SmartTemplate4 14:48:39.38 [327 ms] NotifyComposeBodyReady SmartTemplate4 14:48:39.39 [1 ms] SmartTemplate4.notifyComposeBodyReady() SmartTemplate4 14:48:39.99 [60 ms] getLocale() returns: en-US
when SmartTemplate4's NotifyComposeBodyReady listener is executed, 1) in the reply case the images are already converted. 2) in the forward case they are not converted. So this happens (weirdly) before ST4 does it's work. For the moment I will try and build in a delay for the forwarding case to see if Thunderbird can do the replacement then.
Created an attachment (id=8441) [details] 1.5.1 prerelease 6 I added a (at the moment configurable) delay of 2000ms before the SmartTemplate4 template processing, this seems to help You can tweak this in about:config with the value extensions.smartTemplate4.forwardInlineImg.delay from my tests I was able to lower this to 1ms without losing the images. Maybe just having it run asynchronously is enough for Thunderbird to access the event loop for replacing the images and turning them into data URLs
Created an attachment (id=8442) [details] 1.5.1 prerelease 10 This version also supports inline images forwarding while using Stationery templates.
Fixed for Release 1.5.1