Closed Bug 10344 Opened 25 years ago Closed 25 years ago

Send Later failing if "Unsent Messages" folder is not displayed after copy operation

Categories

(MailNews Core :: Backend, defect, P2)

x86
Windows NT

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rhp, Assigned: scottputterman)

References

Details

(Keywords: regression, Whiteboard: [nsbeta2+])

I am having a problem with send later operations and specifically the GetMessages call. If I do this: - start seamonkey - compose a message - "send later" which calls jefft's copy service and copies into the Unsent Messages folder - Do a "Send Unsent Messages" This line fails: nsresult ret = mMessageFolder->GetMessages(&mEnumerator); and specifically, this code: NS_IMETHODIMP nsMsgLocalMailFolder::GetMessages(nsIEnumerator* *result) { nsresult rv = GetDatabase(); // this is failing Now if I do "Send Unsent Messages" again, it works.
QA Contact: lchiang → esther
Copying people in the know. I'm scratching my head on this one and could use some help. - rhp
If what I think happening is happening then this probably isn't going to get fixed for M9. I thought that we might not be copying the header correctly when doing Send Later, but the call to GetDatabase can fail in the copy portion if the folder isn't already parsed. You need to click on the UnsentMessages folder before doing this operation. In theory you should only have to do this once ever.
Shouldn't opening a database force a folder to be reparsed if the msf file is out-of-date or for some reason that the timestamp weren't agree upon?
yes, but it happens asynchronously, as a result of running a url to reparse the folder.
And since it's asynch, you don't add the header to the database when you do a copy. Until you click on a folder, this is a vicious cycle which will prevent this from working.
Actually, I do add a new msg hdr at the end of the copy operation. At the end of the copy operation the header is correctly added to the database. You could test this by opening up the Sent folder and then try to send a message. Once you sent, the message header is added and you can click on it to display it.
You only add a header if GetDatabase doesn't fail. If it fails which can happen if we have to parse it, you won't add the header. I think this is what might be causing SendLater to fail.
I guess the question is how can we ensure that GetDatabae() will always do the right thing. If it's out-of-date reparse it bring it up to date then handed over to whoever wants it.
It can't do the right thing synchronously, because that would block the thread. If the thread is the UI thread, this would hang the application.
Yes, we need to do that or do it synchronously. But one of the two has to be done.
Is it fair to say that my send later code is not the problem here. I just want to be sure I have it clear if I get another bug about Send Later operations. - rhp
If the person filing the bug doesn't click on the unsent folder, which they probably won't, then it's not your fault. If they do, it could be.
Status: NEW → ASSIGNED
Target Milestone: M10
setting target M10.
Linux 8.5 build non_Necko (1999-07-28-15 M9) I have seen that using a POP account, the followings do not work unless I exit/relaunch apprunner: Send Unsent Messages Save As Draft Save As Template I talked to Scott, these problems are the same bug as this one.
Just to clarify Fenella's comments. One of the causes of this bug is that headers aren't being copied over to the unsent messages folder. I imagine the same thing is happening with the folders she mentioned.
Whiteboard: [PR1]
Sounds like this needs to be fixed for PR1, so I added a note to the Status Whiteboard
Triaging to M11
Target Milestone: M11 → M12
Marking M12. Though since I haven't looked into this, I will make 2 comments. If it turns out that this is happening because we need to keep track of what we're doing so that after we've loaded the folder we can perform the copy, then my guess is that this won't happen until post B1. However, there is a possibility this is happening for the same reason the trash folder gets parsed on delete and the inbox is get reparsed after a Get Msg's. Perhaps this will go away after that
Blocks: 11091
(target milestone is M11 or M12 - add to mail beta tracking bug)
Target Milestone: M12 → M14
Does this still happen?
Yes this is still an issue and it probably isn't noticed very often because we really don't have the UI hooked up for the drafts feature yet. - rhp
Nice to have. Doesn't seem like a B1 stopper.
Whiteboard: [PR1]
rhp, could this have been fixed somehow. Using the win32 2000012520M13 build I don't have a problem as stated in the original scenario where Send Unsent Messages fails the first time. I tried this with a newly created POP and an IMAP account: 1. Launch Messenger 2. Select New Msg (created a message) 3. Selected File|Send Later (compose window closed and message was in Local Unsent Messages folder) 4. Selected File|Send Unsent Messages And the Message was sent (no longer in Unsent Messages folder and was received by the account where it was sent to). Please let me know if this is a migrated account bug or if it's still happening to you.
Update and current behavior: build 2000-03-10-09 on win98. Send Unsent Messages doesn't work if you have focus in the Local Folder (where the Unsent Messages folder is located). As soon as you change to another account and select File|Send Unsent Messages, the messages are sent. Also note: you don't have to select that folder first to have the messages get sent. To test: 1. Launch Seamonkey 2. Launch Mail 3. Select an account and select New Msg. Send Later a message to the account your sending from (do NOT go to the Local Folder where Unsent Messages is located). Check to see if the message is retrieved when you do a Get Msg. It shouldn't have! 4. Now, Select File|Send Unsent Messages, now check to see if the message was retrieved. It should now be there!
Target Milestone: M14 → M17
Mail Review recommends beta2 stopper. Adding nsbeta2 keyword.
Keywords: nsbeta2
Using latest builds 2000-05-10 on win98, mac and linux this is still a problem, and worst now, it doesn't send Unsent messages at all.
Upgrading to major, regression, can't send unsent messages now at all.
Severity: normal → major
Keywords: regression
Putting on [nsbeta2+] radar for beta2 fix.
Whiteboard: [nsbeta2+]
Priority: P3 → P2
Resolving this as fixed again because bug 36159 (sending unsent messages was failing), I was able to test this scenario. Verified. builds 2000-05-25 on win98 and mac and 2000-05-26 on linux.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
now verifying
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.