Closed Bug 103047 Opened 24 years ago Closed 24 years ago

offline: rfe: don't bring up login prompt for each mail account if you are only logged into one act./downloading only from one account

Categories

(SeaMonkey :: MailNews: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: grylchan, Assigned: Bienvenu)

References

Details

Attachments

(1 file)

Problem: The user has multiple mail accounts set up (maybe imap, webmail, popmail) and the user logs into just his/her imap account. When they try do to a 'download and sync', they are prompted to login to both their webmail & pop account before downloading can begin. They only care about downloading their imap account for offline usage. This came up in a email discussion with Laurel, David. I know you said this would be very difficult to implement (i have old copies of our email discussion and can add them to this bug) but I thought I would open a bug and see what happens. I guess we were thinking about the case when user has multiple mail accounts and it would be pain for the user to login to each account if they only want to download say one account. I know there are lots of workarounds: - login to each account to download - setup different profiles (one profile has all mail accounts, another profile contains only mail accounts that you download) - if logged into only mail account, right click on each mail folder and bring up properties tab and click download now button - bring up 'items for offline usage window' through Edit|Mail & Newsgrp Settings|Offline & DiskSpace| and click on select button. Select folders. Then click offline icon and at download now prompt, hit download button. Just throwing it out there.
As part of the mail qa's bug triage day, this is still present in 2001-12-14-09-trunk build.
*** Bug 118256 has been marked as a duplicate of this bug. ***
adding couple of people to cc list
This sounds like the behavior we'd want. Is this hard to implement?
Status: NEW → ASSIGNED
it's hard to implement in a way that will make everybody happy. First of all, why shouldn't we download pop3 mail, or at least offer to? Pop3 users need to download their mail before going offline just like imap users. And they have no way of indicating that their inbox is configured for offline use, because pop3 is sorta always configured for offline use. We can remove pop3 from the offline equation, but I'm not sure that's going to make everyone happy. For imap folders, it's difficult to tell if we shouldn't download messages in the inbox. If no folders are configured for offline use on that account, and there are no filters on that account that might move messages to a local folder, then conceivably we can skip that account. I can code that up, but it won't be pretty (especially checking if there are any filters that move messages to local folders).
Do you get prompted for all accounts before the first folder is downloaded or before it looks at each account? It sounds like the first case from the description. I agree that there's a problem for POP. It seems like we need a way in the UI to specify that a POP Inbox should be downloaded when synching. For the IMAP case, is the problem that one IMAP account might filter into another IMAP account and we don't want to prompt during synching? I hadn't really thought about the POP case when I made my original comment. It seems that having the user log into an IMAP account that they are not downloading from is unexpected behavior. It sounds like filters complicates things.
what happens is we update the inbox for each account first before doing the rest of each account, because mail filters can filter anywhere. The order is not optional. What's optional is what accounts we decide to update the inbox for at all. I can make it so we don't update an imap account if no folders are configured for offline use for that account. For the power user who has filters that move to local or a different account, well, they'll just have to configure one folder for offline use. I'd rather not look through the filters. Also, the idea of not syncing an account that hasn't been logged into during that session is not a good one - it's arbitrary and not obvious.
nominating - at least for imap, I think I should probably just make it so if you don't have an imap account configured for offline use at all, we don't try to logon to it.
Keywords: nsbeta1
Attached patch proposed fixSplinter Review
don't update imap accounts that have no folders configured for offline use. Also check if the account is configured to automatically retrieve inbox messages.
cc'ing Navin for review.
Comment on attachment 69275 [details] [diff] [review] proposed fix >Index: nsImapOfflineSync.cpp >=================================================================== >RCS file: /cvsroot/mozilla/mailnews/imap/src/nsImapOfflineSync.cpp,v >retrieving revision 1.32 >diff -u -w -r1.32 nsImapOfflineSync.cpp >--- nsImapOfflineSync.cpp 6 Feb 2002 03:54:11 -0000 1.32 >+++ nsImapOfflineSync.cpp 13 Feb 2002 19:13:28 -0000 >@@ -103,7 +103,7 @@ > m_curTempFile->Delete(PR_FALSE); > m_curTempFile = nsnull; > } >- if (NS_SUCCEEDED(exitCode)) >+ if (exitCode != NS_BINDING_ABORTED) > rv = ProcessNextOperation(); > else if (m_listener) // notify main observer. > m_listener->OnStopRunningUrl(url, exitCode); >@@ -255,7 +255,6 @@ > mailnewsUrl->RegisterListener(this); > } > } >- > } > } > else >@@ -962,12 +961,37 @@ > rootMsgFolder->GetFoldersWithFlag(MSG_FOLDER_FLAG_INBOX, 1, &numFolders, getter_AddRefs(inbox)); > if (inbox) > { >+ nsCOMPtr <nsIMsgFolder> offlineImapFolder; >+ nsCOMPtr <nsIMsgImapMailFolder> imapInbox = do_QueryInterface(inbox); >+ if (inbox) >+ { if (imapInbox) //checking for imap accts? I think this was intended to be imapInbox, right >+ rootMsgFolder->GetFoldersWithFlag(MSG_FOLDER_FLAG_OFFLINE, 1, &numFolders, getter_AddRefs(offlineImapFolder)); >+ if (!offlineImapFolder) >+ { >+ // no imap folders configured for offline use - check if the account is set up >+ // so that we always download inbox msg bodies for offline use >+ nsCOMPtr <nsIImapIncomingServer> imapServer = do_QueryInterface(m_currentServer); >+ if (imapServer) >+ { >+ PRBool downloadBodiesOnGetNewMail = PR_FALSE; >+ imapServer->GetDownloadBodiesOnGetNewMail(&downloadBodiesOnGetNewMail); >+ if (downloadBodiesOnGetNewMail) >+ offlineImapFolder = inbox; >+ } >+ } >+ } >+ // if this isn't an imap inbox, or we have an offline imap sub-folder, then update the inbox. >+ // otherwise, it's an imap inbox for an account with no folders configured for offline use, >+ // so just advance to the next server. >+ if (!imapInbox || offlineImapFolder) >+ { > rv = inbox->GetNewMessages(m_window, this); > if (NS_SUCCEEDED(rv)) > return rv; // otherwise, fall through. > } > } > } >+ } > return ProcessNextOperation(); // recurse and do next server. > } > else
thanks, yes, you're right, I've fixed it in my tree. The code still works because the imap server check a few lines later will catch this case, but it's better not to do this code when we don't have too.
Comment on attachment 69275 [details] [diff] [review] proposed fix sr=sspitzer, once you make the fix naving suggest and you add that comment you mentioned over AIM.
Attachment #69275 - Flags: superreview+
r=naving on patch w/ that change
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
fix checked in.
using commercial builds: 2002-02-20-09-trunk nt 4.0 2002-02-20-08-trunk/linux 2.2 2002-02-18-08-trunk/ mac 9.2.2 2002-02-18-09-trunk/ mac 10.1.2 Verified for IMAP acnts only, you will not be prompted to login into any imap mail acnts if you don't have any folders configured for offline use or the pref 'make the messages in my inbox available when I am working offline' is not set for any imap acnt. If you have a folder configured or the pref set, you will be prompted to login to your imap acnt in order for it to be downloaded. Note: if you cancel logins to other acnts, download should still work for the acnts you are logged into. see bug 115405. Tried on imap/webmail acnts. You will still be prompted if it's not a imap mail acnt (ie pop). marking as verified.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: