6

My goal? To tag emails in OS X.

What I succeeded into? I use the Find command in /Users/MyMacAccount/Library/Mail/V3/ with a significative word contained in the email I am looking for, then I tag the email.

Note: After this I can easily find all tagged emails with the find command in Apple Mail. I think this tip could please a lot of users.

How could it be done better? To right click on the email and directly locate it in the Finder.

Note: In past OS X (I am under 10.11.x El Capitan) it was possible to locate an email by command clicking on his title bar. A menu appeared with the actual path on the hard drive. It seems Apple disabled this so we can only see account's name.

What could I do instead? To use the colored flags in Apple Mail… Frankly, who remembers why he or she colored one email in orange or purple ?

In the past, there was MailTags paid plugin, but it seem it wasn't updated for a long time.

I thought I could easily almost find recent emails if I sorted the V3 folder by Date but this is a slow process to be accomplished by the Finder.

Any better idea ? Thank you.

  • 1
    This is a good idea, and I hope that this will be implemented in a future release of Mail. – CadentOrange Aug 13 '17 at 8:34
5

This is work around, but it works for me, and it travels through all MacOS versions from I guess Mountain Lion (not sure when, made it long time ago). Not sure if it is still relevant, but since I found question without answer in search for the same, decided to contribute. Here what I did: with automator create new service for Mail app, "Get Selected mail message". In code I have put:

on run {input, parameters}
  set theSource to {}
  tell application "Mail"
    repeat with msg in input
      set t_myFolder to POSIX path of (account directory of account of mailbox of msg as rich text)
      set len to length of t_myFolder
      set myFolder to rich text 1 thru (len - 1) of t_myFolder
      set messageId to (get id of msg as rich text)
      set myfile to (do shell script "find " & quoted form of myFolder & " -name \"" & messageId & "*.emlx\"") as rich text
      try
        set myalias to (POSIX file myfile) as alias
        if myalias is not missing value then
          tell application "Finder"
            activate
            reveal myalias
          end tell
        end if
      on error
        set debugInfo to "messageID: " & messageId & "
        myFolder: " & myFolder & "
" & "myFile: " & myfile
        display alert "Error ocured. Some Debug info bellow:
        " & debugInfo
        return
      end try
    end repeat
  end tell
end run

What it does - is finds mail message file in Finder and selects it. Then you can add tags to that particular file. After only thing remains is to assign a shortcut in the services (under keyboard).

Choose Service receives selected, "files or folders" in "Mail.app" when creating your Automator Service.

Regards Justas

  • 1
    Hi Justas. Thank you for your help. Sorry to react so late. I didn't know that someone had posted an answer. As far as I know, I have followed all the steps that you have described. Here is a screen capture that shows in one image quite all my settings (please note that my Mac OS is now 11.4 High Sierra). [link]i.imgur.com/kBxmgP0.png[/link] The code you pasted above is saved as a .workflow (logmoncourriel.workflow) file located in users-myaccount-Services It appears as expected in System Settings - Keyboard - Shortcuts-Services-Files and folders. – Peri Aug 28 '18 at 1:18
  • 1
    Then I set a kb shortcut for this new service. The problem is that, first, the service that I have made never shows up in the Service menu of Mail app even if a mail is selected in the mail list nor in the contextual menu (right click on one mail in the mail list). The second issue is that If I press the kb shortcut in same circumstances to trigger the service, I get a message from the Mail-Act-On plugin and, unfortunately, so far, I don't know how to deactivate smallcubed.com Mail plugins. – Peri Aug 28 '18 at 1:18
0

MailTag plugin for Apple Mail is now compatible with El Capitan and higher, even with High Sierra. https://smallcubed.com/mt/ Those tags are not recognized trough MacOS however. Apple Mail search function find mail tagged with MailTag easily but, unfortunately, you can't search them with spotlight. As far as I know.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .