Fix Mail Problems - Take Control of Apple Mail (1.0) (2014)

Take Control of Apple Mail (1.0) (2014)

Fix Mail Problems

As I’ve repeatedly noted, for all its virtues, Mail in Mavericks does have its share of problems. Although a complete troubleshooting guide to Mail could run hundreds of pages, I’ve compiled solutions to some of the most common (and egregious) problems in the pages ahead, including difficulties receiving and sending mail, problems with damaged mailboxes, and misbehaving Spotlight searches.

Although some of this information may provide useful background for resolving iOS Mail issues too, the specifics are different; see Troubleshoot iOS Mail Problems for help with Mail in iOS 7.

Fix Incoming Mail Problems

If Mail cannot download incoming messages, the cause may be anything from an incorrect setting in Mail, to a server problem, to a loss of Internet connectivity. Work through each of the following sections until you resolve the problem.

Tip: To check on what Mail is doing behind the scenes, choose Window > Activity Viewer. A small floating window appears, displaying detail about each activity Mail is performing. To cancel any task, click the red Stop button next to it.

Try Connection Doctor

To open Connection Doctor, choose Window > Connection Doctor. In the Connection Doctor window, Mail lists each incoming and outgoing email account you’ve configured—even those you’ve temporarily disabled. It attempts to log in to each account, and if it fails with any of them, it shows an explanation of why it failed. These explanations aren’t always helpful, but they often give you a good starting point in debugging problems, and are written in refreshingly plain English. If the Connection Doctor window suggests a specific fix, try that first. Otherwise, proceed with the following steps.

Username and Password Errors

If you enter your password in Mail > Preferences > Accounts (or in System Preferences > Internet Accounts), Mavericks stores the password in your keychain (which is usually what you want). If, for security reasons, you prefer for Mail to prompt you for your password each time you connect, leave the Password field blank.

Sometimes, even after successfully checking your email many times with the password you entered, Mail displays a dialog claiming that the mail server has “rejected” your password. Worse, you may re-enter your password—and even select Remember This Password in My Keychain—but find that another error message pops up as soon as you click OK. This annoyance may be due to any number of causes, but most have simple solutions.

If Mail suddenly begins prompting you for your password repeatedly when checking incoming mail (after retrieving it correctly earlier), try these steps in order until the problem goes away:

1. Click Cancel, and then check your email again in a minute or two. Sometimes the problem goes away on its own. (If your account is offline, choose Mailbox > Take All Accounts Online.)

2. Check your keychain. To do so, open Keychain Access, which you can find in /Applications/Utilities. Choose Keychain Access > Keychain First Aid. Click the Repair radio button, enter your administrator password, and click Start. If the keychain file had an error, Keychain First Aid will fix it.

3. If the problem persists, return to Keychain Access. Make sure that Passwords or All Items is selected under Category, locate your mail server in the list (for iCloud accounts, the entry’s name should show the Apple ID you use for iCloud and its type should be “application password”), select it, and click Delete. The next time you check your email, you’ll be prompted for your password; enter it, select Remember This Password in My Keychain, and click OK.

4. If even that doesn’t work, your mail server may be at fault. Try checking your messages with another email client. If the other client also gives you error messages, ask your email provider for help.

Connection Errors

Sometimes, when talking to a mail server, Mail encounters an error before it even gets to the point of sending your password. These errors tend to fall into two categories, which I call “squiggles” and “bangs.”


If you see a jagged symbol, which I call a “squiggle,” by an account name in your sidebar, that account is offline (not connected to the mail server). If Mail cannot connect to an account after multiple attempts, it takes the account offline automatically. This may be an indication that your computer as a whole is having Internet connection issues.

Note: If you don’t see the individual account names in your sidebar, click the triangle next to the Inbox icon to expand the account list.

You can take an account offline manually by choosing Mailbox > Online Status > Take “Account-Name” Offline; you can also take all your accounts offline at once by choosing Mailbox > Take All Accounts Offline.

If you encounter a squiggle, follow these steps:

1. Check your Internet connection: Visit your favorite Web site to make sure your computer can access the Internet. If it can’t, the problem relates to a failed Internet connection. If it can, continue with the next step.

2. Try bringing your accounts online manually: To reestablish a connection, click the squiggle symbol next to an account name. Sometimes this jogs the connection back to life. If the account remains offline, continue to the next step.

3. Check mail server availability: Mail servers occasionally crash or become unreachable due to network problems. If an account remains offline even after you complete Step 2, contact your email provider to see if there’s a problem.


If you see an exclamation point inside a triangle , which I refer to as a “bang,” next to an account name in your sidebar, that account had a failed connection. This means Mail could contact the server, but received an error message before it could log in.

If you encounter a bang, follow these steps:

1. Try again: Click the bang symbol to display a dialog with the error message Mail encountered—it may tell you what the problem is, or at least give you some troubleshooting clues. Regardless of the error message, click Take All Accounts Online. Sometimes errors are fleeting and go away if you do this.

2. Check your authentication method: Mail can use any of several methods to send your mail server your username and password. If you selected a method that your mail server doesn’t understand, it will complain.

Go to Mail > Accounts > Account Name > Advanced, set the Authentication pop-up menu to Password, close the Preferences window (saving changes when prompted), and then try to connect once again. If the error remains, repeat the procedure with the other options in the pop-up menu, starting with MD5 Challenge-Response (or, for an iCloud account, Apple Token).

3. Verify your SSL setting: Another problem that can cause a bang is an incorrect SSL setting—some POP and IMAP servers support SSL, some don’t.

To check yours, go to Mail > Preferences > Accounts > Account Name > Advanced. Toggle the state of the Use SSL checkbox, close the Preferences window (saving changes when prompted), and try to connect again. If that doesn’t work, switch back to your original setting and contact your email provider for assistance.

In most cases, one of these changes will solve your problem.

Fix Outgoing Mail (SMTP) Problems

One of the most frequently reported problems with Mail is an inability to send messages—after clicking the Send button, an error message appears. Rather than go into every detail about the many possible causes, symptoms, and solutions, I want to focus on just four central points. If you get an error when sending mail, most likely the reason is one of the following:

· You have the wrong SMTP server selected.

· You have incorrect settings for the right SMTP server.

· Your ISP is blocking the port Mail wants to use.

· The SMTP server doesn’t respond quickly enough.

In all these cases, the solution is usually to make sure you know the correct settings and then enter them in the proper places.

Find the Correct Settings

When you initially set up your email account, your email provider typically provides you with a short list of information you’d need to access your account, including some or all of these details:

· Your username, password, and email address

· Addresses for the incoming (POP, IMAP, iCloud, or Exchange) mail server and the outgoing (SMTP) server

· Whether the incoming and/or outgoing servers use SSL (secure sockets layer, which encrypts email in transit)

· You may also have received the following information:

§ What authentication method the servers use to verify your identity (for example, Password, MD5 Challenge-Response, or Kerberos)

§ What port(s) the incoming and outgoing servers can use

You’ll need all this information now. If you can’t find it in your records or on your email provider’s Web site, contact their customer service department for assistance.

Fix the “Wrong Server” Problem

Each email account you’ve set up includes settings for a single SMTP server (except Exchange accounts, which use the same server for incoming and outgoing mail). If you have lots of accounts, Mail may have settings for lots of SMTP servers—including, perhaps, some that are outdated or broken. As a result, it’s easy to inadvertently select the wrong SMTP server. Here’s how to make sure that doesn’t happen.

Clean Out Your SMTP Server List

First, get rid of any SMTP servers that aren’t being used. To do this:

1. Go to Mail > Preferences > Accounts, select any account in the list on the left, and click Account Information.

2. From the Outgoing Mail Server (SMTP) pop-up menu at the bottom, choose Edit SMTP Server List.

3. In the list at the top, note the third column, In Use By Account. If this column is blank for any item in the list, select that item and click the minus button to remove it (confirming the deletion if prompted to do so). Repeat this step for every server not in use.

4. Click OK.

Associate the Right Server with Each Account

Next, make sure every (incoming) email account uses the correct outgoing server. Follow these steps:

1. Go to Mail > Preferences > Accounts, select the first account in the list on the left, and click Account Information.

2. In the Outgoing Mail Server (SMTP) pop-up menu near the bottom, verify that the server selected is the one matching your incoming account. If the server appears to be correct but you’re still getting errors when sending mail, proceed with…

3. From the Outgoing Mail Server (SMTP) pop-up menu at the bottom, choose Edit SMTP Server List.

4. In the list at the top, make sure the SMTP server that was selected for the account is still selected, and click the minus button to remove it (confirming the deletion if prompted to do so).

5. Click the plus button to add a new SMTP server. Fill in both the Account Information and Advanced views with the information you got from your email provider.

6. Click OK.

Now, choose Window > Connection Doctor, and wait for it to complete its checks. Next to the SMTP server you just modified, if you see a green dot (on the left) and the text (on the right) “Connection and login to server succeeded,” the change worked. If not, go on to…

Pick a Server (Just One)

Mail offers the choice to use a single SMTP server with any given (incoming) mail account, or to permit multiple servers to be used. In Mail > Preferences > Accounts > Account Name > Account Information, you’ll see a checkbox Use Only This Server at the bottom:

· If that’s checked, then only the SMTP account shown in the pop-up menu will be used with that account.

· If it’s unchecked, as it likely is by default, then the new message window for outgoing messages from that account will display a second pop-up menu, next to the From menu, showing all the SMTP servers you’ve configured (Figure 21).

(After making any change to this setting, close the Preferences window and save your changes.)

**Figure 21:** If you have more than one email account, you may see this pop-up menu when composing new messages.

Figure 21: If you have more than one email account, you may see this pop-up menu when composing new messages.

I recommend selecting Use Only This Server for each account (either in the Account Information view or using the SMTP server pop-up menu). Likewise, in Mail > Preferences > General, I suggest setting the If Outgoing Server Is Unavailable pop-up menu to Automatically Try Sending Later, rather than Show a List of Alternate Servers.

The reason for these recommendations is that many SMTP servers refuse to send messages—even though your username and password are correct—if the From address is not the one associated with that account. For example, if I create a new message with my account selected, and then try to send it with the iCloud SMTP server, the server will reject it, assuming it’s spam because I’m sending it from the “wrong” email address. If you stick with the single, correct SMTP server for each account, you won’t have email address mismatches.

Fix the “Incorrect Settings” Problem

Your SMTP server typically requires several settings to be exactly correct: your email address, username, and password; the server’s address; the port; the authentication method; and the SSL setting (on or off). If any one of these is wrong, you won’t be able to send mail.

Unfortunately, Mail’s error messages don’t always clarify which setting might be incorrect. So, if an error message doesn’t provide an obvious solution, do this:

1. Go to Mail > Preferences > Accounts > Account Name > Account Information.

2. From the Outgoing Mail Server (SMTP) pop-up menu, choose Edit SMTP Server List.

3. Confirm that the correct SMTP server is already selected in the list at the top; if not, select the one you want.

4. In the Account Information view in the bottom portion of the dialog, confirm that the address in the Server Name field is exactly what your email provider specified (typically something like

5. In the Advanced view, confirm that the server port, Use Secure Sockets Layer (SSL) checkbox, authentication method, username, and password exactly match what your email provider specified. If any of these items is incorrect (or if you’re not sure), change the information and click OK. (Note that some email providers expect you to use your entire email address as the username.)

Now, choose Window > Connection Doctor, and wait for it to complete its checks. Next to the SMTP server you just modified, if you see a green dot (on the left) and the text (on the right) “Connection and login to server succeeded,” the change worked.

If the change did not work, proceed with:

6. Return to the Advanced view from Step 5 just previously. Choose a different authentication method, click OK, and repeat the check in Connection Doctor. Repeat this step up to five times, trying each method (including None) in turn. If that doesn’t work…

7. Back in the Advanced view, toggle the Use Secure Sockets Layer (SSL) checkbox, click OK, and repeat the check in Connection Doctor.

8. If that doesn’t work, try the suggestions for fixing a blocked port, next.

Fix the “Blocked Port” Problem

Many ISPs routinely block the use of port 25—the “channel” most email programs use to send mail—except for email originating within that ISP’s network and sent via its own SMTP servers. For example, if you’re a Kabletown customer and connect via a cable modem from your home, you could send email via Kabletown’s SMTP server through port 25. But you couldn’t send mail using, say, on port 25 (because that server is outside the network from which you’re connecting); similarly, if you take your laptop to a coffee shop, whose network service is provided by another ISP, that network may block port 25, preventing you from reaching your regular Kabletown SMTP server while you’re away from home.

Either way, the result is an error message when you try sending email from a particular account—even though you might be able to send from that account at another location, or from another account at your current location.

One way to solve this problem is to switch to a different port—one that isn’t blocked. For this to work, your email provider must support the use of the alternative port. To learn if they do, check their Web site or contact their technical support department…or just guess. The most commonly used alternative ports are 465 and 587, and Mail in Mavericks is smart enough to try these two ports automatically if port 25 doesn’t work. However, if your provider uses a less-common port (such as 2525), you can enter that manually:

1. Choose Mail > Preferences > Accounts > Account Name > Account Information.

2. From the Outgoing Mail Server (SMTP) pop-up menu, choose Edit SMTP Server List.

3. Confirm that the correct SMTP server is already selected in the list at the top; if not, select the one you want.

4. In the Advanced view below, select Use Custom Port, enter the port number (whatever your email provider tells you) in the adjacent field, and click OK.

Now, choose Window > Connection Doctor, and wait for it to complete its checks. Next to the SMTP server you just modified, if you see a green dot (on the left) and the text (on the right) “Connection and login to server succeeded,” all is well. If not, contact your email provider for assistance.

If no alternative port solves the problem, you have three options:

· Use your email provider’s webmail interface to send mail until you return to your regular network.

· Send your message from a different account in Mail, if one is available that doesn’t suffer from the port-blocking problem.

· Use a virtual private network—such as those provided at modest cost by PublicVPN or WiTopia, or the free Hotspot Shield service.

A VPN makes it appear to remote servers as though your Mac is on a different network, not the one you’re actually connected to, and in most cases the VPN won’t block port 25. Once you connect your Mac to the Internet using one of these services, you should be able to send email on whichever port you normally use.

Fix Sending Delays

Error messages aren’t the only problems that can arise when sending mail. Sometimes Mail succeeds in sending your messages, but only after what seems like an interminable delay—perhaps 30 seconds or longer for each outgoing message. One likely cause of this problem is that OS X is taking too long to do a DNS lookup. This problem, in turn, often occurs when your ISP doesn’t provide any explicit addresses for its DNS servers, but rather supplies them dynamically using DHCP (dynamic host configuration protocol), the same method by which your computer probably gets its IP address. The upshot is that when Mail tries to send, it might have to query several servers in a row (waiting for each to respond) to figure out how to talk to the SMTP server.

The best way to solve this problem is to stop relying on your ISP to dynamically supply the addresses of its (possibly slow) DNS servers. Using a free service called OpenDNS, you can override your default (dynamic or blank) DNS server list with the static addresses of speedy, reliable DNS servers.

To use OpenDNS, follow these steps:

1. Go to System Preferences > Network.

2. If the lock icon in the lower left corner of the window is in its locked state, click it and enter your administrator credentials to unlock it.

3. In the list on the left, select the interface that’s currently providing your Internet access (usually AirPort or Built-in Ethernet).

4. Click Advanced, and then click DNS.

5. Under the DNS Server field, click the plus button, type, and press Return. Then repeat this step using the address Click OK.

6. Click Apply, and then close System Preferences.

7. To verify that the new DNS servers are working, visit any Web site in your favorite browser.

If DNS delays were causing the sending problem, sending mail should go much faster now.

Untangle Special Mailboxes

Because each mail server handles Special Mailboxes slightly differently, you may find that Mail isn’t using the mailbox you expect for Drafts, Sent, Trash, Junk, and/or Archive. The solution may be as simple as selecting the mailbox in question and choosing Mailbox > Use This Mailbox For > Mailbox Name. However, if you still have problems—such as more than one special mailbox for a given category appearing in a single account—these instructions may help.

I’ll use Sent here, but this process is similar for any special mailbox:

1. Go to Mail > Preferences > Accounts > Account Name > Mailbox Behaviors, where Account Name is the one with the duplicate mailboxes.

2. Deselect the Store Sent Messages on the Server checkbox. Then close the Preferences window and click Save when prompted.

3. In Mail’s sidebar, look in the list of mailboxes for the account in question. A new mailbox should have appeared in that list—that’s the one Mail was using for Sent in that account until a moment ago, and you’ve just relocated it from the server to your Mac. (For the sake of illustration, let’s say that newly added mailbox is called Sent Messages.) You’ll also see the existing duplicate mailbox(es), such as Sent.

4. Decide which mailbox you want to be the “real” Sent mailbox. The best way to do this is to send a message from a webmail interface and see which mailbox it goes into.

5. Whichever mailbox you identified in the last step, select it and choose Mailbox > Use This Mailbox For > Sent. Mail moves it back to the server and reenables the Store Sent Messages on the Server setting—there’s no need to return to the Preferences window.

6. Now go to the other Sent (or Sent Messages or whatever) mailbox that’s still listed under that account in the sidebar. Select all the messages in it and drag them to the Sent mailbox for that account under the unified Sent mailbox.

7. Wait until all the messages have finished copying (choose Window > Activity to keep an eye on your progress). Then select the now-empty mailbox whose contents you just moved, choose Mailbox > Delete Mailbox, and click Delete to confirm.

From now on, you shouldn’t be troubled by duplicate mailboxes. (Remember, you can follow almost exactly the same steps for other special mailboxes, such as Trash.)

Fix Mailbox Problems

Most of the time, Mail correctly displays all the messages in a mailbox when you select that mailbox. If your mailboxes begin misbehaving, though—not showing messages you know they contain or taking an extremely long time to show their contents, for example, you can try some easy tricks to fix them.

If your envelope index—a special database that Mail uses to track which messages are in which mailboxes—and the other files that Mail uses to catalog messages become damaged, Mail may exhibit any of several symptoms, including:

· Missing messages

· Incorrect message counts, in which the number of unread messages shown next to the mailbox name in the sidebar differs from the number of unread messages you see inside the mailbox

· An empty mailbox, even though you know it contains messages

· Failure to move messages into a mailbox (manually or using rules)

If you suspect that a mailbox contains errors, the standard cure-all is to rebuild it. To do this, select the mailbox (or mailboxes, by holding down the Shift key and clicking them) and choose Mailbox > Rebuild.

If that doesn’t solve the problem, quit Mail, navigate to ~/Library/Mail/V2/MailData and drag the files Envelope Index, Envelope Index-shm, and Envelope Index-wal to the Trash. When you launch Mail again, it’ll tell you that you need to “import” all your messages (just as it may have done when you upgraded from Mountain Lion to Mavericks). Let it do so—it’s recreating your envelope index from scratch, but don’t worry, you won’t lose any messages, labels, message status, or other data—and when it finishes, your mailboxes should behave correctly.

Fix Searching Errors

If searches in Mail fail blatantly (such as no results appearing for a very common term), even after attempting the mailbox fixes in the previous topic, you can try any of several ways to fix the problem. Try each of these things, in order, until the problem goes away:

1. Make sure that neither the folder ~/Library/Mail nor any of its parent folders is in Spotlight’s Privacy list (in System Preferences > Spotlight > Privacy).

2. You may have server-hosted mailboxes whose contents have not yet been downloaded to your computer. To ensure that they have been, choose Mailbox > Synchronize Account-Name. If more than one account is configured, the account names appear on a Synchronize submenu, but you can choose Mailbox > Synchronize All Accounts to sync everything at once. Either way, this may take some time.

3. Open /Applications/Utilities/Terminal and enter the following command, followed by Return, to re-import your Mail messages into the Spotlight index:

mdimport -r /System/Library/Spotlight/Mail.mdimporter

4. Still no luck? Trash your entire Spotlight index and allow Spotlight to rebuild it from scratch. In Terminal, type:

sudo mdutil -E /

Press Return and enter your administrator password when prompted. The rebuilding process goes on in the background, but may take several hours. When it’s finished, searching should work.