Make a link to specific email message

04/06/2026

        In the Mail application on macOS, you can make a link to a specific email message and paste it to any app. For example, you can make a new event in the calendar or a new reminder in the Reminder app and paste there a link to the email message, which is connected to the event/reminder.


        To make a link, you need to get an ID of the message, which you can do through AppleScript. This is the script:


tell application "Mail"

    set mailSelected to get selection

    set messageID to get message id of item 1 of mailSelected

end tell



set messageURL to "message://%3C" & messageID & "%3E"

set the clipboard to the messageURL


        For first, we download the selected message; second, we get the ID of it; then we add the „message://%3C” before ID and "%3E" after ID; and in the end, we copy this URL to the clipboard where we can paste it to any app. There is no guarantee that every app will recognize it as a URL, but many Apple apps recognize it without a problem; and also, this URL is working not only on macOS but also on iOS! So, this is very useful.