Closed Bug 181127 Opened 22 years ago Closed 22 years ago

Forward as Attachment broken

Categories

(MailNews Core :: Composition, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.3alpha

People

(Reporter: granrosebugs, Assigned: bugzilla)

References

Details

(Keywords: regression, Whiteboard: have fix)

Attachments

(1 file)

On XP in 2002112004, when I try to forward a message as an attachment it fails
with "Sending of message failed.  Please verify that your Mail and Newsgroup
account settings are correct and try again."

This is a major hassle since you can't forward multiple email messages in the
same email unless you use forward as attachment.
This was not broken on the 11-19 trunk build.  Yes this is bad. 
I am looking at it...
Status: NEW → ASSIGNED
For some reason, NewChannelFromUR failed for the sheme imap-message!
David Bienvenu found what cause the regression. The recent change in
nsExternalProtocolHandler.cpp for bug 176904 change the way URIs for unkown
protocol are created which cause the logic in nsMsgAttachmentHandler to failed.

Working on a fix...
Jean-Francois, which part of the logic fails exactly?  I can't find any
NS_NewURI or equivalent callers in that file.  :(
Blocks: 176904
from nsMsgComposeAndSend::AddCompFieldRemoteAttachments, we call nsMsgNewURL
which call NewURI. The internal logic of the attachment handler was conting on
the fact NewURI will return a null uri when procesing a custom mailnews uri.
This is not true anymore, NewURI always return a valid uri now. Patch coming...
Keywords: regression
Whiteboard: have fix
Target Milestone: --- → mozilla1.3alpha
Attached patch Proposed fix, v1Splinter Review
Before calling nsMsgNewURL, detect ourself if we are processing a mailnews url.
I have tested this patch with those kind of attachment:
local mailbox message
imap message
news message
secure news message
local file attachment
remote attachment (http://)

work great in each cases.
Attachment #106964 - Flags: superreview?(bienvenu)
Attachment #106964 - Flags: review?(cavin)
Comment on attachment 106964 [details] [diff] [review]
Proposed fix, v1

r=cavin.
Attachment #106964 - Flags: review?(cavin) → review+
sr=bzbarsky (not sure whether you still want bienvenu to look at the patch, so
leaving flag as-is for now).
Comment on attachment 106964 [details] [diff] [review]
Proposed fix, v1

sr=bienvenu
Attachment #106964 - Flags: superreview?(bienvenu) → superreview+
Fix checked in. Thanks David for your help
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 181321 has been marked as a duplicate of this bug. ***
*** Bug 181308 has been marked as a duplicate of this bug. ***
*** Bug 181335 has been marked as a duplicate of this bug. ***
using trunk build 20021121 on winxp, macosx and linux this is fixed. Verified
Status: RESOLVED → VERIFIED
*** Bug 181348 has been marked as a duplicate of this bug. ***
*** Bug 181348 has been marked as a duplicate of this bug. ***
Blocks: 181593
The annoying thing about this bug was that the error message was completely
useless (did not mention "attachment", did not mention what failed). I've filed
an RFE for better error messages - bug 181593. In short, I believe, send error
messages should at least tell which "stage" of the process failed (collecting
attachments, connecting to the SMTP server, SMTP itself).
OS: Windows XP → All
Hardware: PC → All
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: