First Last Prev Next    No search results available
Details
: forwarding email with embedded images removes images
Bug#: 26434
: smarttemplate4
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Linux
: unspecified
: P2
: normal
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Alex Davila <alex@davila.me>
Assigned To: Axel Grude <axel.grude@gmail.com>
:

Attachments
1.5.1 prerelease 6 (494.83 KB, application/x-xpinstall)
2018-04-28 08:27, Axel Grude
no flags Details
1.5.1 prerelease 10 (494.86 KB, application/x-xpinstall)
2018-04-28 09:13, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2017-10-20 14:15
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.
------- Comment #1 From Axel Grude 2018-04-28 02:08:40 -------
*** Bug 26519 has been marked as a duplicate of this bug. ***
------- Comment #2 From Axel Grude 2018-04-28 02:50:43 -------
Related Tb bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=820589
------- Comment #3 From Axel Grude 2018-04-28 06:55:16 -------
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
------- Comment #4 From Axel Grude 2018-04-28 08:21:50 -------
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.
------- Comment #5 From Axel Grude 2018-04-28 08:27:20 -------
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
------- Comment #6 From Axel Grude 2018-04-28 09:13:07 -------
Created an attachment (id=8442) [details]
1.5.1 prerelease 10


This version also supports inline images forwarding while using Stationery
templates.
------- Comment #7 From Axel Grude 2018-05-01 03:03:26 -------
Fixed for Release 1.5.1

First Last Prev Next    No search results available