message/rfc822 attachments of saved messages open blank (or don't open)

RESOLVED FIXED in Thunderbird 3.0b4

Status

MailNews Core
Attachments
RESOLVED FIXED
12 years ago
9 years ago

People

(Reporter: Stephan Fuhrmann, Assigned: Tobias Koenig)

Tracking

(Blocks: 2 bugs)

Trunk
Thunderbird 3.0b4
Dependency tree / graph
Bug Flags:
wanted-thunderbird3 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
I have a saved-to-disk e-mail with an attachment that is also an e-mail (forwarded mail). I can reopen it with "file / open saved message..." and it looks fine.
But now I double click on the attachment and I see ... an empty window instead of the attached email.

How to reproduce:

1.) Forward an e-mail to yourself as an attachment
2 [review].) Receive the e-mail
3.) Save it to disk using file/save-as/file
4.) open it again with file/open saved message...
5.) double click on the attached e-mail
6.) a new window opens with no content :-(

Comment 1

12 years ago
Here is a variation of this behaviour (using TB version 2 alpha 1 (20060724) under Windows 2000).

1-2, same as before, only be sure that both original and forwarded emails are plain text format.
3. Double click to open the received email with the forwarded attachment.
4. Right click on the attachment, and Save As.. a file
5. File/Open Saved Message ... to open the message just saved
6. Message is displayed with unexpected HTML format items.

Actual display of message body:

<div class="moz-text-flowed" style="font-family: -moz-fixed">This is plain text.

</div> 

Expected display:

This is plain text.

If I open the saved message using Notepad++, I can see that the <div ... markers are in the saved file. These same format items are NOT in the file if I save the original message, that is before it was forwarded using an attachment.

Comment 2

12 years ago
I can reproduce the original symptom on Windows 2000 with TB 1.5.  With a current nightly builds (2b1-1128, 3a1-1202), opening the attachment doesn't open any window at all.  This is accompanied by this in the Error Console;
=======
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMessenger.openAttachment]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/msgHdrViewOverlay.js :: openAttachment :: line 1048"  data: no]
=======

In Seamonkey 1.5a-1123, I see the original symptom.  In Seamonkey 1.1-1202, I see the new symptom.  Whatever's changed has apparently been recent, Core, and both trunk and branch.

If someone fixes this, make sure that fixing the exception doesn't simply revert to the earlier symptom!
Assignee: mscott → nobody
Component: General → MailNews: Attachments
OS: Linux → All
Product: Thunderbird → Core
QA Contact: general → attachments
Hardware: PC → All
Summary: Saved mails attachments don't behave like inbox mails → message/rfc822 attachments of saved messages open blank (or don't open)
Version: 1.5 → Trunk

Comment 3

12 years ago
(In reply to comment #1)
> Actual display of message body:
> 
> <div class="moz-text-flowed" style="font-family: -moz-fixed">This is plain
> text.
> 
> </div> 

That is the symptom of bug 121297.
The same appears when trying to save such an attachment. In this case the following Exception is thrown:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMessenger.saveAttachment]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/msgHdrViewOverlay.js :: saveAttachment :: line 1038"  data: no]

Should I create a new bug for this issue or do we handle both here? In the second case we have to update the summary.
Blocks: 303545

Updated

12 years ago
Blocks: 269826

Updated

11 years ago
Duplicate of this bug: 383403
Duplicate of this bug: 386924

Updated

11 years ago
Depends on: 121297
(Reporter)

Comment 7

11 years ago
Bug still exists in 2.0.0.9 (20071031)

Comment 8

10 years ago
can still reproduce in 2 and 3
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.2pre) Gecko/2008072303 Shredder/3.0a2pre ID:2008072303

opens a blank window
Product: Core → MailNews Core

Comment 9

10 years ago
2.0.0.16 and 3.0alpha2 have this problem.:(
(Assignee)

Comment 10

9 years ago
Created attachment 381294 [details] [diff] [review]
Fixes opening of attached .eml files

This patch fixes the opening of attached .eml files.

The problem was that nsMessenger::LoadURL doesn't handle mailbox:// urls correctly, so the code assumed that the size of the attachment is 0 bytes and therefor it opened an empty window.
Attachment #381294 - Flags: review?(bienvenu)

Comment 11

9 years ago
I can confirm the patch works.
Assignee: nobody → tokoe
Status: NEW → ASSIGNED
Flags: wanted-thunderbird3+
Whiteboard: [has patch, need reviews]

Updated

9 years ago
Duplicate of this bug: 497871

Updated

9 years ago
Attachment #381294 - Flags: superreview?(bugzilla)
Attachment #381294 - Flags: review?(bienvenu)
Attachment #381294 - Flags: review+

Comment 13

9 years ago
Comment on attachment 381294 [details] [diff] [review]
Fixes opening of attached .eml files

thx for the patch, it does indeed work, r=me, but instead of kNotFound, we should be using -1, since kNotFound isn't available with frozen linkages...

Updated

9 years ago
Whiteboard: [has patch, need reviews] → [has patch, review, need sr]
Comment on attachment 381294 [details] [diff] [review]
Fixes opening of attached .eml files

Thanks for fixing this. sr=Standard8.

I have done the kNotFound => -1 change for you and checked this into the tree:

http://hg.mozilla.org/comm-central/rev/bb7a554cd5a5
Attachment #381294 - Flags: superreview?(bugzilla) → superreview+
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Whiteboard: [has patch, review, need sr]
Target Milestone: --- → Thunderbird 3.0b4
Duplicate of this bug: 376805
You need to log in before you can comment on or make changes to this bug.