Closed Bug 216060 Opened 22 years ago Closed 20 years ago

Messages not deleted from Drafts folder [IMAP account] when they are sent if you clicked "Send later"

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: janv)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 This happens with IMAP accounts Reproducible: Always Steps to Reproduce: 1.Compose a new email message 2.Click Save 3.Click File>Send Later 4.Close window Actual Results: Messages are copied to unsent folder but they are NOT deleted from Drafts folder Expected Results: Messages are deleted form Drafts folder and moved to unsent messages
AFAIK, this is correct and by design
by design? if it isn't a template, why should it not be removed?
According to Drafts Feature Test Specification (http://www.mozilla.org/quality/mailnews/tests/sea-mn-drafts.html), drafts should be removed from Drafts folder after they have been sent. This works properly with the "Send" function, but with "Send later", they aren't removed from Drafts folder. ***This also happens with POP accounts***
Also happens in build Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030824
Confirmed in Mozilla 1.5 Beta - Released August 27, 2003
Severity: normal → major
Regarding comment #3: The "Send later" action must be interpreted as a send action. The referenced document states that the message must be removed when hitting Send later (section "Sending a Draft" subsection E)!! Additional explanation: When hitting the Send later button, the user indicates that it has finished editing the message and that it should be delivered as soon as possible. Hence there should not be a copy in the Drafts folder, because that suggests that the message has not been finished and has not been sent. Having a message in the Drafts folder suggests/indicates that the user has not executed *any* send action (Send or Send later).
*** Bug 225177 has been marked as a duplicate of this bug. ***
--> IMAP.
Assignee: sspitzer → bienvenu
Component: Networking: MailNews General → Networking: IMAP
Confirmed in Mozilla 1.7.2 20040803
I'm debugging this a little bit and I found out that draft messages don't get ids when they are saved. http://lxr.mozilla.org/seamonkey/source/mailnews/compose/src/nsMsgCompose.cpp#3111 // Reset draft (uid) url with the new uid. if (msgFolder && newUid != nsMsgKey_None) { rv = msgFolder->GenerateMessageURI(newUid, getter_Copies(newDraftIdURL)); NS_ENSURE_SUCCESS(rv, rv); compFields->SetDraftId(newDraftIdURL.get()); } it fails because newUid == nsMsgKey_None any ideas why |msgSend->GetMessageKey(&newUid);| returns nsMsgKey_None ?
David, what would be a correct way to fix this?
Actually, the patch for bug 80819 caused this problem.
to be honest, I don't know, but I think backing out the relevant part of the fix for bug 80819 is a definite possibility, since I don't think it was crucial to that bug. Cc'ing Frank, who did the fix.
Attached patch fix (obsolete) — Splinter Review
Assignee: bienvenu → varga
Status: NEW → ASSIGNED
Attachment #166782 - Flags: review?(bienvenu)
Comment on attachment 166782 [details] [diff] [review] fix can you use the non-K&R braces style? do you need PR_FREEIF? PR_Free checks for null, and I don't think you need to null out msgID, which is what PR_FREEIF does... static PRBool isEmpty(const char* aString) the aString style is for idl methods, I thought, though it's preferable here to the _p thing... :-)
sorry I forgot to fix the original braces style the _p thing is really not used anywhere else :) is this ok? void nsMsgComposeAndSend::GenerateMessageId() { if (isEmpty(mCompFields->GetMessageId())) { if (isEmpty(mCompFields->GetTo()) && isEmpty(mCompFields->GetCc()) && isEmpty(mCompFields->GetBcc()) && !isEmpty(mCompFields->GetNewsgroups())) { PRBool generateNewsMessageId = PR_FALSE; mUserIdentity->GetBoolAttribute("generate_news_message_id", &generateNewsMessageId); if (!generateNewsMessageId) return; } char* msgID = msg_generate_message_id(mUserIdentity); mCompFields->SetMessageId(msgID); PR_Free(msgID); } }
sure, as long as you get rid of the k&r braces :-)
ah, you probably mean if () { } vs if () { } I'll fix it before checkin got your r= ?
Comment on attachment 166782 [details] [diff] [review] fix yes, that's right - I prefer if (a) { foo(); }
Attachment #166782 - Flags: review?(bienvenu) → review+
Attached patch final patchSplinter Review
Attachment #166782 - Attachment is obsolete: true
Attachment #166784 - Flags: superreview?(mscott)
Attachment #166784 - Flags: review+
Attachment #166784 - Flags: superreview?(mscott) → superreview+
Product: MailNews → Core
checked in
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Component: Networking: IMAP → ChatZilla
Resolution: --- → FIXED
Component: ChatZilla → Networking: IMAP
(In reply to comment #3) > ***This also happens with POP accounts*** Right. BUT I still see this happen on my POP accounts with Mozilla build 2004112405 on WinNT4. I see the summary, so I ask: Was the fix for all accounts or only for IMAP acc.? If yes, what is with Bug 104818 for the same issue?
No, it should work right will all accounts. The other bug might be a different issue.
(In reply to comment #24) > No, it should work right will all accounts. As I said it does not. I did the steps from comment 0. My build should have the patch. > The other bug might be a different issue. IMO it is the same, see the steps (compose, save, keep writing, send later).
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: