Sub topic 1
How Mail, Calendar, and Contacts fit together
Mail, Calendar, and Contacts look like three separate programs. In practice they are three views onto data that comes from your accounts. This chapter gives you the working model that the rest of the tutorial builds on. It also covers the mistakes people most often make when they treat the apps as independent.
Prerequisites
This chapter assumes you have:
- Basic macOS navigation skills: Finder, System Settings, and the menu bar.
- At least one email address.
- Some familiarity with an Apple Account (formerly Apple ID).
You don't need any scripting experience. The short scripts near the end are read-only and are there to make the model concrete.
The core idea: accounts supply the data
Each app is a client. It displays and edits data that lives somewhere else, usually on a server run by Apple, Google, Microsoft, or your employer. The link between an app and a server is an account.
You add accounts once, in System Settings under Internet Accounts. One account can supply several kinds of data. An iCloud account can provide mail, calendars, and contacts. A Google account can provide the same three. An account can also provide only some of them. A school's IMAP mail account may have no calendar or contacts at all.
Each account has a switch for every data type it offers. So "my Exchange account" is not the same thing as "my Mail setup." The account is the source. Mail is one window onto it.
| App | What it shows | Where the data normally lives |
|---|---|---|
| Messages, mailboxes, drafts, sent items | A mail server (iCloud, IMAP, or Exchange) | |
| Calendar | Calendars and events | A calendar server (iCloud, CalDAV, or Exchange) |
| Contacts | Contact cards and groups | A contacts server (iCloud, CardDAV, or Exchange) |
The server column matters because of one rule that explains most sync behavior. For server-backed accounts, the server holds the authoritative copy. Your Mac keeps a local cache so the apps are fast and work offline. Changes you make are sent up, and changes made elsewhere are pulled down.
How the pieces connect
The diagram shows the flow. Accounts sit between the servers and the apps. The apps then exchange small pieces of information with each other.
Read the diagram from left to right. Data is fetched through accounts first. The arrows between the apps are the cross-app features, which a later chapter covers in detail.
Three kinds of account sources
Not every account behaves the same way. The distinction decides what syncs and where your data is stored.
- iCloud accounts store mail, calendars, and contacts on Apple's servers. They sync to every device signed in to the same Apple Account.
- IMAP and similar standards-based accounts (including CalDAV for calendars and CardDAV for contacts) keep data on the provider's server. IMAP mail stays on the server, and your Mac mirrors it.
- Exchange accounts use Microsoft's protocol. They commonly carry mail, calendar, and contacts together, plus features such as free/busy lookups and room booking.
There is also a local option. The "On My Mac" storage keeps calendars or contacts only on that one computer. Nothing is uploaded, so nothing appears on your iPhone, and a lost or erased Mac takes that data with it. Later chapters compare these account types in detail. For now, remember that the type of account decides where data is stored and which devices see it.
Following one task through the model
Suppose a colleague emails you a meeting invitation. Here is what happens:
- The message arrives on the mail server and is downloaded into Mail's local cache.
- Mail recognizes the attached invitation and shows Accept, Maybe, and Decline buttons.
- When you accept, the event is created in Calendar, in the account you have chosen as the destination.
- A reply goes back to the organizer by email, using your mail account.
- The calendar server stores the event, so your other devices show it after they sync.
Two accounts can take part in one task. The invitation arrived through a mail account, but the event may be stored in a different calendar account. Neither the apps nor your accounts guess your intent here. The default calendar setting in Calendar decides where new events go.
Confirming the model with a script
You can check what each app sees by asking it directly. These commands only read names, so they change nothing. The first time you run one, macOS may ask whether Terminal or Script Editor may control the app. Allow it if you want the script to run. Privacy and permissions get their own chapter.
tell application "Mail"
get name of every account
end telltell application "Calendar"
get name of every calendar
end telltell application "Contacts"
get name of every group
end tellYou can run them in Script Editor, or from Terminal with osascript -e. Compare the results. Mail lists accounts, while Calendar lists calendars and Contacts lists groups. That difference shows the model above: an account is a source, and calendars and groups are containers inside the data it supplies.
You can also hand off a task to the default mail app from the shell:
open "mailto:[email protected]?subject=Hello"This opens a new message with the recipient and subject filled in. The open command doesn't talk to Mail directly. It asks macOS to open the mailto: link in whichever app is the default for it. That app is usually Mail, but it may be another one.
Common errors and how the model explains them
Most beginner problems come from confusing the app, the account, and the stored data.
- Deleting an account to "fix" one app. Removing an account from Internet Accounts removes its mail, calendars, and contacts from the Mac at once. To stop one data type, turn off just that switch for the account. The data stays on the server either way. Anything stored only in "On My Mac" is not on any server.
- Expecting a local item to appear on another device. A contact or event saved under "On My Mac" never syncs. Check which account or calendar an item belongs to before you assume it is lost.
- Seeing duplicate contacts. If the same person exists in both iCloud and Exchange, Contacts shows two cards. They live in separate accounts. Merging or removing one is a data decision, not a bug.
- Creating events in the wrong calendar. The new-event default is a setting. If invitations land in an unexpected account, check the default calendar.
- Assuming the apps are the problem when mail or events are missing. Because the server is the source of truth, first check the account: whether it is enabled, whether you are online, and whether the account's own settings are correct. Open the app's preferences only after that.
What the rest of the tutorial covers
The chapters that follow take each part of this model in turn. They cover how accounts are added and how account types differ, then how to work in each app. They end with iCloud syncing, permissions, troubleshooting, and automation. Keep this chapter's picture in mind: servers, then accounts, then apps, with the apps passing small pieces of data to one another.
Exercise
You turn off the Calendars switch for your Exchange account in Internet Accounts. What happens to your Exchange mail, and what happens to the calendar data on the Exchange server?
Show answer
Your Exchange mail is unaffected, because each data type has its own switch. The calendar data stays on the Exchange server. Calendar stops showing it on this Mac, and you can get it back by turning the switch on again.
Exercise
A colleague's invitation arrives in your work mail account, but you want the event to appear in your iCloud calendar. Which part of the model decides where the event is stored?
Show answer
The destination calendar chosen in Calendar, which defaults to your default calendar setting. The mail account only delivers the invitation. The calendar account that owns the chosen calendar stores the event.