Sub topic 13
Where the apps work together
Mail, Calendar, and Contacts share data through the system, not through each other's files. This chapter covers the main places where one app uses another's information. It also covers where those links fail.
This chapter assumes you know how accounts are added in System Settings, how Mail messages are read and sent, how Calendar events and invitations work, and how contact cards are built. If an account has not been added yet, start with the earlier chapters on accounts.
The shared model
Each app owns one kind of data. Contacts holds people. Calendar holds events. Mail holds messages. The apps cooperate in three ways:
- Lookups. One app asks another for data it does not own, such as Mail asking Contacts for an address.
- Detection. Mail scans message text for dates, addresses, and phone numbers, and offers to hand them to Calendar or Contacts.
- Handoff. An action in one app opens or fills in another app, such as a mailto link opening a new Mail message.
Contacts feeding Mail and Calendar
Address autocomplete in Mail
When you type in the To field, Mail suggests matches from several sources:
- Your contact cards, from every account that has Contacts turned on.
- Addresses you have written to or received mail from before (the "Previous Recipients" list).
- Directory servers, such as an Exchange account's Global Address List.
A suggestion that comes from a contact card shows the contact's name. A suggestion from your history shows only an address. If a contact has several addresses, each one appears as a separate suggestion with its label (work, home).
If a wrong address keeps appearing, it is usually in Previous Recipients. Choose Window > Previous Recipients in Mail, select the entry, and click Remove from List. Editing the contact card does not clear it.
VIPs and groups
A VIP in Mail is a sender flagged by address or contact. When you mark a sender as VIP, Mail keeps that status tied to the address and shows a star next to the name.
A contact group works as a distribution list. Type the group name in the To field and Mail expands it to every member's email address. Two limits apply:
- Only members who have an email address are included.
- Mail uses the first email address on each card unless you choose otherwise. Mark the preferred address on the card to control which one is used.
Invitees in Calendar
When you add an invitee to an event, Calendar looks up names the same way Mail does. Contact cards and directory entries both work. Calendar also shows birthdays from contact cards in a special Birthdays calendar. That calendar is read-only: to change a birthday, edit the card in Contacts.
Mail detecting data in messages
Mail scans message bodies for data it recognizes and underlines it or shows a banner. Common detections:
| Detected item | What Mail offers | Where it goes |
|---|---|---|
| Event details (date, time, place) | **Add to Calendar** | Calendar |
| Sender or signature details | **Add to Contacts** | Contacts |
| Street address | Open in Maps | Maps |
| Phone number | Call or copy, through a paired iPhone | Phone |
| Calendar attachment (.ics) | Add or open | Calendar |
Two details matter in practice.
First, detection looks at the text of the message. It can miss dates written in unusual ways, and it can guess wrong on ambiguous ones like "3/4". Check the date in the new event before you save it.
Second, Add to Contacts creates a card in your default contacts account. If the default is a different account from the one you expected, the card will sync somewhere else. You can check the default account in Contacts > Settings > General.
Invitations received by email
Invitations are the most important link between Mail and Calendar. When someone invites you to an event, the invitation arrives as an email that contains a calendar attachment (an iCalendar, or .ics, file). The behavior depends on the account type:
- On Exchange and iCloud accounts, the invitation also appears directly in Calendar, and you can respond from either app.
- On a plain IMAP account, the invitation exists only as a message. Mail shows an event summary with Accept, Maybe, and Decline buttons. Your response is sent as a reply email, and Calendar adds the event.
If an invitation appears in Mail but never reaches Calendar, check which account the event would be saved to. Mail's calendar handling uses the calendar for the receiving account when one exists, and your default calendar otherwise.
Calendar sending mail
When you invite people or reply to an invitation, Calendar sends the message through an account's mail service. Which account it uses depends on the calendar:
- A calendar on an iCloud account sends invitations from iCloud servers.
- A calendar on an Exchange account sends through Exchange.
- A calendar on a local ("On My Mac") account cannot send invitations at all.
That last case catches people. If the Add Invitees field does not work, or the invitation never arrives, the event is probably in an "On My Mac" calendar. Move the event to a calendar in an iCloud or Exchange account.
Handoffs from outside the apps
macOS also routes links to these apps. A mailto: link opens a new message in the default mail app, with fields filled in from the link. The default is set in Mail > Settings > General > Default email reader.
open "mailto:[email protected]?subject=Hello"This opens a draft with the recipient and subject filled in, and you still press Send yourself. Spaces and special characters in the subject must be URL-encoded, for example Hello%20there.
Similar handoffs exist for other link types. A .ics file opened from Finder is offered to Calendar, and a .vcf file is offered to Contacts. Opening either one prompts you to choose a destination account or calendar before anything is added.
Reading across apps with AppleScript
You can confirm that each app is reachable from a script. These are read-only checks, and each returns names only. The first time you run one, macOS asks whether your terminal or script editor may control the app (see the privacy 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 tellThe calendar names that Calendar returns are the exact strings you need if you later write a script that targets one calendar. The same applies to account names in Mail and group names in Contacts.
Failure modes
| Symptom | Likely cause | Check |
|---|---|---|
| Contact missing from Mail autocomplete | Contacts is off for that account | **Internet Accounts**, then the account's Contacts switch |
| Old address keeps suggested | Entry in Previous Recipients | **Window > Previous Recipients** in Mail |
| Invitation not sent | Event is in an "On My Mac" calendar | Event's calendar field |
| Invitation in Mail but not in Calendar | IMAP account, or Calendar switch off | Account type and its Calendars switch |
| Added contact lands in the wrong account | Default account setting | **Contacts > Settings > General** |
| `mailto:` opens the wrong app | Default email reader | **Mail > Settings > General** |
| Script gets a permission error | Automation access not granted | **Privacy & Security > Automation** |
Putting it together
A typical flow shows every link at once. A colleague emails a meeting request. Mail recognizes the event and you accept it, so the event lands in Calendar and a reply email goes out. You add a second colleague to the invite, and Calendar finds them through Contacts. You then choose Add to Contacts for the sender, and they appear in autocomplete the next time you write to them. Each step uses a different app, and the account settings decide where the data lives.
Exercise
You create an event in a calendar under "On My Mac" and add three invitees. None of them receives an invitation. What is the cause, and how do you fix it?
Show answer
Local "On My Mac" calendars have no mail service behind them, so Calendar cannot send invitations from them. Move the event, or create a new one, in a calendar belonging to an iCloud or Exchange account, then add the invitees again.
Exercise
You chose Add to Contacts from a message, but the new card does not appear on your iPhone. Where do you look first?
Show answer
Check the default account in Contacts > Settings > General. The card was probably saved to an account that is not synced to the iPhone, such as a local account. Move the card to the iCloud account, or change the default.
Exercise
Mail keeps suggesting an old email address for a person even though you corrected their contact card. How do you stop it?
Show answer
The suggestion comes from Previous Recipients, not from the card. In Mail, choose Window > Previous Recipients, select the old address, and click Remove from List.