If anyone happens to be reading this, here are some more symptoms:
When I use “Connection Doctor,” I generally get an immediate green light from Gmail SMTP, but the IMAP connection *always* takes several seconds to a couple of minutes of saying “Connecting to server…” before it turns green and says it’s connected, and about a third of the time it never makes it, displaying instead a message to the effect that it could not connect to this IMAP server.
My wife doesn’t seem to have this problem at all. She’s still running Yosemite, and she’s got a MacBook Air instead of my brandy-new MacBook Pro running El Capitan, but the setups are otherwise identical. In particular, we have the same ISP and same Airport network, suggesting that any unreliabilities there are not the cause of my problems.
Another peculiarity, perhaps related, is that messages that I have already read frequently pop up again as “unread,” sometimes after several hours. I’m guessing that this is because a series of timeouts prevented their “read” status from being properly communicated to Gmail. Once again, this does not seem to happen with my wife’s account.
-Here’s a sample of the IMAP synch activity log:
Jun 1 08:05:18 Mail[13085] <Debug>: [Gmail] Stopping because account went offline
Jun 1 08:05:18 Mail[13085] <Debug>: [Gmail - Inbox] <Sync> Stopping because account went offline
Jun 1 08:05:18 Mail[13085] <Debug>: [Gmail - Inbox] <Sync> Mailbox sync task finished
Jun 1 08:05:18 Mail[13085] <Debug>: [Gmail - Sent] <Sync> Stopping because account went offline
Jun 1 08:05:18 Mail[13085] <Debug>: [Gmail - Sent] <Sync> Mailbox sync task finished
Jun 1 08:07:18 Mail[13085] <Debug>: [Gmail - Inbox] <Sync> Created mailbox sync task
Jun 1 08:07:18 Mail[13085] <Debug>: [Gmail - Inbox] <Sync> Recalculated priorities - network: 22, persistence: 0
Jun 1 08:07:18 Mail[13085] <Debug>: [Gmail - Sent] <Sync> Created mailbox sync task
Jun 1 08:07:18 Mail[13085] <Debug>: [Gmail - Sent] <Sync> Recalculated priorities - network: 22, persistence: 0
Jun 1 08:07:18 Mail[13085] <Debug>: [Gmail] Creating account sync task, 8 mailboxes needing status