While the Activity window provides a real-time look at what's occurring as you send or receive mail, the Mail logs go one step further and keep a record of each event. Since the Activity window is real-time, if you glance away or even blink, you may miss seeing a connection issue. The Mail logs, on the other hand, keep a record of the connection process that you can review at your leisure.
Enabling Mail Logs
Apple includes an AppleScript to turn Mail logging on. Once it's turned on, the Console logs will keep track of your Mail logs until you quit the Mail application. If you want to keep Mail logging active, you'll have to re-run the script before each time you launch Mail.
To turn Mail logging on:
- If Mail is open, quit Mail.
- Open the folder located at: /Library/Scripts/Mail Scripts.
- Double-click the 'Turn on Logging.scpt' file.
- If the AppleScript Editor window opens, click the 'Run' button in the top left corner.
- If a dialog box opens, asking if you wish to run the script, click 'Run.'
- Next, a dialog box will open, asking if you wish to 'Enable socket logging for checking or sending mail. Quit Mail to turn logging off.' Click the 'Both' button.
- Logging will be enabled, and Mail will launch.
Viewing Mail Logs
Mail logs are written as Console messages that can be displayed in Apple's Console application. Console allows you to view the various logs your Mac keeps.
- Launch Console, located at /Applications/Utilities/.
- In the Console window, expand the Database Searches area in the left-hand pane.
- Select the Console Messages entry.
- The right-hand pane will now display all messages written to the Console. Mail messages will contain the sender ID com.apple.mail. You can filter out all of the other Console messages by entering com.apple.mail into the Filter field in the top right-hand corner of the Console window. You can also use the Filter field to find just the specific email account that's having problems. For instance, if you're having problems connecting to Gmail, try entering 'gmail.com' (without the quotes) in the Filter field. If you're only having a connection problem when sending mail, try entering 'smtp' (without the quotes) in the Filter field to only show logs when sending email.
You can now use the Mail logs to find the type of problem you're having, such as passwords being rejected, connections being rejected, or servers down. Once you locate the problem, use Mail to make corrections to the Account settings, then try running the Connection Doctor again for a quick test. The most common problems are wrong account name or password, connecting to the wrong server, the wrong port number, or using the wrong form of authentication.
Use the logs to check all of the above against the information your email provider gave you to set up your email client. Finally, if you still have issues, copy the Mail logs showing the problem and ask your email provider to review them and provide assistance.