User Tools

Site Tools



Use Textexpander to create a link back to any email in

  Returns a link to the first selected Apple Mail message
tell application "Mail"
  set _msgs to selected messages of message viewer 0
  if (_msgs is not equal to missing value) then
    set _msg to first item of _msgs
    set _msgID to do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & (message id of _msg)

    return "message://%3C" & (_msgID) & "%3E"
  end if
end tell
applescripts.txt · Last modified: 2019/02/06 13:05 by admin