FREE! Plan Your Ideal Week: Bonus Workshop + Planner  →  Get the Workshop

Working with email URLs on macOS

macOS email clients like Mail and Airmail, the latter being our pick for the best third-party email client on the Mac, support the use of URLs to link to individual messages from other applications. The ability to generate links to specific email messages can be a HUGE timesaver from a productivity perspective. Here’s a few example use cases:

  • Having a link to the original message in the notes of the task in your task manager allows you to quickly jump straight to the message you need to take action on and then check it off.
  • Having a link to the original message in your reference file (like Evernote) can be very handy when trying to find information quickly and share it with the rest of your team or organization.
  • Having a link to the original message in a calendar app can help provide more context for the meeting, especially if the other party didn’t provide any additional notes or details.

When you use a link to a specific email message, it allows you to go straight to that message and bypass the rest of your email. That means you won’t get distracted by what might have appeared in your inbox since you last looked, and you are free to focus on the thing that you need to take action on. It also means you don’t need to search through your archive or dig through project folders to find the exact message.

Most of the time, the link to a specific email message will look something like this:


Believe it or not, this URL format tells your Mac exactly which message you’re trying to reference. There’s really only two parts to this complicated-looking URL: 1) the “message:” prefix that tells your Mac that this is an email, and 2) the Message ID that tells it exactly which email to pull up. Once you know how to locate these unique Message IDs for the email messages you want to reference, you can create links that allow you to open the messages directly without having to look through your email client to find it.

Different email clients have different ways of finding these message-specific URLs, so let’s take a look at Apple Mail first.


Finding message URLs in Apple Mail can be a little tricky if you don’t know where to look. The absolute easiest way to get the message-specific URL for a specific message is to simply drag the email message into an application like TextEdit, which will create the subject line of the email as a clickable link. But if you want to be able to see the Message ID, you can actually display this in the preferences:

  1. In Mail.app, click Mail → Preferences.
  2. Select the Viewing tab in the Preferences window.
  3. Choose Custom from the Show header detail pop-up menu.
  4. Click the plus (+) symbol in the lower-left corner, then enter “Message-ID” in the space provided and click “OK” to save.

Now, when you view an email in Apple Mail, you will see the “Message-ID” field.

You can copy this Message-ID and use it to create your own message URLs. Just paste the Message-ID after the Message URL prefix: message:%3Message-ID%3E

You can automate that string creation in something like TextExpander. Alternatively, you can run this AppleScript from TextExpander or Alfred. It retrieves the message URL of the opened, active message in Mail and puts a link to it on the clipboard:

tell application "Mail"
    set selectedMessages to selection
    set theMessage to item 1 of selectedMessages
    set messageid to message id of theMessage
    -- Make URL (must use URL-encoded values for "<" and ">")
    set urlText to "message://" & "%3c" & messageid & "%3e"
    return urlText
end tell

There are a couple different formats that will work on your Mac. Here’s a Daring Fireball post that explains the different message URL formats. With a little tinkering, you’ll be able to easily copy the message ID from Mail for easy reference later.


Finding a message-specific URL is much easier in Airmail (the third-party email client that we recommend) because it is actually built in to the application:

  1. Select the message for which you want the URL.
  2. Click Edit → Copy Message Link, or hit the keyboard shortcut: ⌃ ⌥ ⌘ C.
  3. Paste the URL where you want the direct message link to appear.

For most instances where you’d want a link to the original message, Airmail provides an even simpler way to implement these direct message URLs. Airmail integrates directly with other productivity apps, so if you wanted to include the link in a calendar event or a task in your task manager, all you have to do is right-click the selected message and select the appropriate app from the list. You can also get the link to the message via this contextual menu.

If you don’t see your favorite app in the list, you might need to enable it first. Here’s how to set this up:

  1. In Airmail, click Airmail → Preferences.
  2. Select the Services tab.
  3. Select the services you want to use inside Airmail and make sure they are enabled.

Once you have your favorite productivity apps enabled, you can quickly and easily send email messages directly to them.

One thing to be aware of: the links that Airmail uses to direct messages do NOT use the default message: prefix. Instead, Airmail uses an airmail: prefix, which tells your Mac to open the link in Airmail specifically. This is what a direct message URL looks like in Airmail:


This isn’t a big deal if you use Airmail as your default email client, but it’s important to know that it’s not using the Mac’s default message URL scheme. If you’re just kicking the tires on Airmail, you might want to decide whether you want to use it long-term before creating a bunch of direct message URLs that you won’t be able to use if you decide to move away from Airmail in the future.

Once you have the process of obtaining message URLs, your options open up significantly for keeping your inbox clean and feeling confident that items aren’t falling through the cracks.