Fix mail problems on a Mac
Mail problems on a Mac, cause by cause, from Apple's and the providers' own pages and from what we ran into building Roost.
Apple Mail
Search not working
Search scope, Spotlight's privacy list, Rebuild, then the Envelope Index, in that order.
Not receiving mail
Offline accounts, Connection Doctor, hidden messages, Focus filters and full mailboxes.
Refresh Mail
Shift-Command-N, the missing Get Mail button, one account, offline accounts and Rebuild.
Accounts and sign-in
Before you try anything
Open your provider's website in a browser (iCloud.com, Gmail, Outlook on the web) and look for the message or sign in. If it fails there too, the problem is with the account or the provider, and nothing in Mail will fix it. If it works there, the fix is on your Mac, and the pages above go cause by cause.
Gmail and Yahoo have their own longer guides: Gmail not working in Mac Mail and Yahoo Mail on a Mac. Server names and ports for each provider are under IMAP settings.