message with embedded image send as plaintext generate bogus content

VERIFIED FIXED in mozilla1.3alpha


16 years ago
11 years ago


(Reporter: moz-bugzilla2, Assigned: bugzilla)



Windows 2000

Firefox Tracking Flags

(Not tracked)


(Whiteboard: MS Outlook)


(3 attachments)



16 years ago
Steps to reproduce

1) Send message from Outlook with a graphic attached to it Mozilla email account
2) Message displays fine in Mozilla
3) Reply to that message in Plain Text Only format
4) Mozilla and Outlook user see the reply message that just says "This is a
multi-part message in MIME format."

Expected Result
Message looks correct in Outlook and Mozilla.

If the attachment is not a graphic, it works fine or if you send message in Rich
Text Format.

Content of message that causes problems replying to:

Received: by 
	id <>; Mon, 14 Oct 2002 14:30:23 -0400
Message-ID: <>
From: Steve Wardell <>
To: Steve Wardell <>
Subject: test 2
Date: Mon, 14 Oct 2002 14:30:23 -0400
MIME-Version: 1.0
Content-Type: image/jpeg;
	name="Sprint Conferencing Final.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="Sprint Conferencing Final.jpg"



16 years ago
QA Contact: gayatri → yulian

Comment 1

16 years ago
Reporter, the sample message you provide does not match your description of the
pronlem! Can you either attach to this bug report a full sample message or send
me one. Thanks
Whiteboard: MS Outlook

Comment 2

16 years ago
Created attachment 105236 [details]
Outlook email with jpeg in it

Comment 3

16 years ago
Created attachment 105237 [details]
Content of responding to initial message using mozilla

Comment 4

16 years ago
Take a look at those two attachments and see if that clears things up.


16 years ago
Attachment #105237 - Attachment mime type: message/rfc822 → text/plain

Comment 5

16 years ago
I am using a Win2K debug trunk build from last night and I can reply to the test
message (in HTML) and view the replied message without problem. 

Comment 6

16 years ago
Try with text and not HTML and that's when the problem will occur.

Comment 7

16 years ago
This is becoming a real nuisance. This problem is very easily reproducable.
Mozilla's not even able to read the replies I send out sometimes.

Comment 8

16 years ago
Ok, I can reproduce this problem with the following easy step:

1) Open an HTML message compose
2) type some text and insert an image (directly in the message body, not as
3) go to menu Options/Format and select Plain Text only
4) Send the message
==> the message body contains only:
 This is a multi-part message in MIME format

The whole message body is missing!
Summary: Replies to Exchange MIME messages display multi-part message error → message with embedded image send as plaintext generate bogus content
Target Milestone: --- → mozilla1.3alpha

Comment 9

16 years ago
Created attachment 106841 [details] [diff] [review]
Proposed fix, v1

We were adding the Multipart blurb when we detected we have attachment. But in
the case where we send the message in plain text, we drop related attachment.
The test wasn't catching that case which cause the message body to be replaced
by the blurb. The solution is to not check anymore on the attachment count but
rather on the type of the main part.


16 years ago
Attachment #106841 - Flags: review?(cavin)

Comment 10

16 years ago
Comment on attachment 106841 [details] [diff] [review]
Proposed fix, v1

Attachment #106841 - Flags: review?(cavin) → review+


16 years ago
Severity: normal → major
Keywords: dataloss
Comment on attachment 106841 [details] [diff] [review]
Proposed fix, v1

why don't we need to check m_attachment_count > 0 anymore?
Comment on attachment 106841 [details] [diff] [review]
Proposed fix, v1


// Does the top part is a multipart container?

probably should be:

// Is the top part a multipart container?


can you add a comment to the code about why we don't have to check
m_attachment_count anymore?

once you do that, sr=sspitzer
Attachment #106841 - Flags: superreview+

Comment 13

16 years ago
I don't check m_attachment_count anymore because it's not reliable. The goal
here is (and was) to add the blurb text to the top part if it'a multipart.
Therefore instead of testing some other variable, why not simply test the type
of the top part, this is 100% reliable.

Adding a comment would not be helpfullm esppecially once the code is changed!



16 years ago
Blocks: 88110
1) "I don't check m_attachment_count anymore because it's not reliable."

are there other places in the code we are using it, and it's not reliable?

(looking in nsMsgSend.cpp, there might be more.)

2) "Adding a comment would not be helpfullm esppecially once the code is changed!"

I think it would be worth adding a comment like:

// can't use m_attachment_count because it's not reliable
// instead use type of main part
// see bug #174396

comments are free (except when checking out the source over CVS).

Code gets moved around, white space changes, etc, which makes it hard to follow
with cvsblame.

a comment just makes people think twice (and check existing bugs) before
changing (or reverting) code.

does your fix regress

Comment 15

16 years ago
1) m_attachment_count is nor reliable to determine if we are sending a multipart
message. m_attachment_count contains the real number of attachment we have
processed but not the number of attachment we will really send. That why it's
much better to test the to part's type.

2) ok, I'll add the comment

Comment 16

16 years ago
Fix checked in
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 17

16 years ago
Woho! Works great. 2002112004 on W2K seems to have no problems now. Now my
workmates will stop telling me they can't read my messages :)
*** Bug 178099 has been marked as a duplicate of this bug. ***
*** Bug 187238 has been marked as a duplicate of this bug. ***
*** Bug 187474 has been marked as a duplicate of this bug. ***
*** Bug 188428 has been marked as a duplicate of this bug. ***
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.