Closed Bug 169271 Opened 22 years ago Closed 20 years ago

Displaying message with all parts inline doesn't save the msg for offline use

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: Bienvenu)

Details

(Whiteboard: fixed-aviary1.0)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826
Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826

I have Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826 
and MailNews connected to my IMAP mail account.

My inbox is selected for offline use.

While online, Mail automatically retrieves new messages when I click on them
(including attachments). Sometimes the "envelope" icon in the subject line does
not turn grey after the message has downloaded, escpecially with mails that
have attachments.

If I change to "offline" mode and start the sync process, these messages
get downloaded again albeit they have already been retrieved while reading
online.

Expected Behaviour:
While reading mail online, the icon should turn grey when the message
has been retrieved. When syncing , these messages must not be 
downloaded again.



Reproducible: Sometimes

Steps to Reproduce:
1. Send yourself some emails including an attachment, preferably images.
2. Read your new emails from an IMAP account, watch those nice images you sent
yourself. :-)
3. Go offline and sync. 

Actual Results:  
The emails (and the attachments, of course) get downloaded again.

Expected Results:  
Mozilla should not have downloaded emails that have already been read.

May be connected to bug #46233
QA Contact: huang → gchan
is Bug #131586 copy of this one
if the mail has an attachment that is not displayed inline (like a word
document), we don't fetch the whole message, but rather just the parts we
display. So we can't store it for offline use because we haven't fetched the
whole thing.
I suspect this is invalid/wfm
David,

you can check this with emails that have either only _one_ attachment or with
images as attachments (in this case all attachments/images will be downloaded to
be displayed inline).

One more hint, this bug has nothing to do with messages exceeding the "size limit"
set in "Mail Account Settings" -> "Offline & Disk Space" . For this see bug
210205 instead.
I've reproduced the bug and took a snapshot of it.

As you can see, my limit on "message size" is 100kb. My Inbox folder is
set for "offline" use.

I've sent myself three messages, each containing an image of different size.
I pressed "get msgs" and the new messages appeared. Then I've selected each
message to make Mozilla download their contents.

Message "zu groß" contains an image of 120kb (which grows to 160kb after
being base64 encoded). This message is downloaded when selected but not stored
due to the imposed size limit of 100kb. The envelope icon is white (== not
cached).

Message "mittel" contains an image of 56kb (encoded 78kb). The message is
currently selected and the image is displayed. The message has thus been fully
downloaded, still the envelope icon is white (== not chached) although the size
is below the limit.

Message "genau klein" contains an image of 7kb (encoded 10kb). It has been
selected before and thus has been downloaded completely. The message size is
well below the limit. Correctly, the envelope icon is grey (== cached).

After I took the snapshot I pressed "download & sync" and that's when Mozilla
downloaded the message "mittel" again and finally the envelope icon turned
grey.
But it should have store the message the first time I accessed it! This is the
bug I try to describe.
Yes, you're right. I've changed the summary to reflect the actual problem. The
code that decides if we should save a message for offline use will not save the
message if its size is greater than the mime parts on demand threshhold, which
by default is 15K. The pref you're setting to 100K only affects the case where
you're downloading the whole folder for offline use, not the case where you
select a single message. The problem is that we don't know at the point where
you click on the message whether we're going to fetch the whole message or just
the parts, but that's the point at which we decide if we're going to save it for
offline use or not.
Assignee: mscott → bienvenu
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Sync/Downloading mail for offline use sometimes transfers messages although already downloaded → Displaying message with all parts inline doesn't save the msg for offline use
Attached patch proposed fixSplinter Review
remember that we want to save the msg for offline use in the url, and use that
info if we fall back to fetching the whole message.
Attachment #148973 - Flags: superreview?(mscott)
Attachment #148973 - Flags: superreview?(mscott) → superreview+
fixed
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: fixed-aviary1.0
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: