Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Sonoma is here in a week and there are no mail plugs to have mail unread like mail act on until you mark it manually :(
Smallcubed say "Apple has permanently disabled the ability to load any Mail plugin in macOS 14."
AppleScript lets you do pretty much anything in Mail. (with a bit of effort)
 
Sadly, I don’t think you’re going to see one. The official MailKit extensions framework is extremely limited compared with what the old plug-ins could do.

From what I can see in Apple’s developer documentation, marking or leaving messages as unread is not one of the things that Apple allows. Message properties can only be adjusted as messages are downloaded.

I’ve had to adjust my workflow a bit in Apple Mail to account for the lack of plug-ins. One thing that could work is to use flags instead. Since Apple Mail has several different flag colors, if you set up a rule to flag important messages (or even all messages) with a specific color you don’t use for anything else, then you could rely on those. Mail on macOS and iOS lets you filter by flagged and unread, and clearing the flags when you’re done with them is also pretty easy to do.
Realy a good idea for rules! Thank you!!
I just checked they have an option to set the mail as a colour but it might be hard to 'uncolour' the email opposed to your flag workflow :)
 
A few days ago, I released SpamSieve 3 with support for Apple Mail in Sonoma, and here’s a guide explaining the transition from the Mail plug-in to the Mail extension.
Michael - I along with several people in our office have relied on SpamSieve and your outstanding support for years. We really appreciate the release of SpamSieve 3 ahead of today's Sonoma release. Also thank you for taking the opportunity with SpamSieve 3 to make it even easier to use and understand with an amazing help system. Updating from 2 to 3 was very easy for users because of all your hard work.
 
  • Like
Reactions: markgpearse
Realy a good idea for rules! Thank you!!
I just checked they have an option to set the mail as a colour but it might be hard to 'uncolour' the email opposed to your flag workflow :)
I use the "Remove Flag" keyboard shortcut, which I think is CMD+SHIFT+; by default. Sadly, that used to work better when I could use Gmailinator to map J/K as prev/next message (another casualty of Apple's removal of legacy plug-in support), but it's still doable with the arrow keys .... I'm still readjusting 😀
 
  • Love
Reactions: TwoBytes
This killing off of functionality is understood, but moving forward with LESS functionality makes no sense for end users. For years I've used a contacts program that lets me see recent sent emails to that contact - extremely handy for communication and sales work. Per that developer that functionality is gone for the foreseeable future.

That of course motivates me to move to a mail client and contacts management software that work hand in hand as described above. Any suggestions?
 
  • Like
Reactions: TwoBytes
Just received M3 MacBook Pro with Sonoma - used Migration Assistant to restore all my data.

I can no longer attach email Signatures in Mail that contain a JPEG logo - just says "Missing Plug-In"!

I can manually drag a JPEG logo from my desktop to the signature area on each email, but it won't let me save the JPEG within the Mail pre-saved signatures list? Why on earth would it need an Extension to save a JPEG in a custom signature in 2023! Even then, where is such an extension?
 
The one piece of good news is that there could be a way for an enterprising developer to cook up something that could do this, but it wouldn't be a MailKit extension. Ironically, it should be doable in AppleScript, as Mail still has a pretty rich AppleScript dictionary, including the ability to get a list of folders ("mailboxes" in Apple Mail parlance) and move selected messages into other mailboxes. You'd have to map the AppleScript to a keyboard sequence using some other tool like Fastscripts or Keyboard Maestro, and of course, you couldn't just use "v" — it would have to be something like OPT-V or CTRL-V.

Here's a quick'n'dirty script I cobbled together just now as a sort of mental exercise... it seems to get the job done for me in the current macOS Sonoma beta. Be sure to replace "my account name" with whatever your IMAP account is called.

AppleScript:
tell application "Mail"
  
    set myaccount to "my account name" 
    set folderlist to name of mailboxes in account myaccount 
    set targetfolder to choose from list of folderlist 
    set theMessages to selection
  
    repeat with eachMessage in theMessages
        set mailbox of eachMessage to mailbox (targetfolder as string) of account myaccount 
    end repeat
  
end tell

This seems really promising! While I have no problem giving FastScripts or Keyboard Maestro $40, I wonder if there isn't an all-Apple way of accomplishing this.

If you use Automator to save each "rule" (the script above, modified to move to a single folder) as a .workflow, these rules will show up in Apple's "Services" menu.

You can then assign these "services" keyboard shortcuts using System Preferences > Keyboard > Keyboard Shortcuts > App Shortcuts > Mail.app

There are two things preventing me from testing this:

(1) I don't know how to format the (targetfolder as string) in the Applescript, above
(2) When I try to fire off a similar Automator "watch me do" (in leu of a working Applescript) I get the error attached.
 

Attachments

  • permission-error.png
    permission-error.png
    74.8 KB · Views: 75
If you use Automator to save each "rule" (the script above, modified to move to a single folder) as a .workflow, these rules will show up in Apple's "Services" menu. You can then assign these "services" keyboard shortcuts using System Preferences > Keyboard > Keyboard Shortcuts > App Shortcuts > Mail.app
I like it! That's a clever idea if you only move to a limited set of folders. I have a Touch Bar MacBook Pro still, so I tend to use that more for my most commonly-moved-to folders, but I'll definitely need a smoother way when I upgrade :)

(1) I don't know how to format the (targetfolder as string) in the Applescript, above
You can basically replace that with the name of the target folder, enclosed in quotes (e.g. "Receipts" or "Newsletters" or whatever). The Applescript prompts with a list of folders, so "as string" is necessary to constrain the result of that as a string, since it comes in as a list item.

(2) When I try to fire off a similar Automator "watch me do" (in leu of a working Applescript) I get the error attached.
You should be able to solve that one with a trip into System Settings, where you can grant permission to either Automator as a whole or your specific .workflow package under Privacy & Security > Accessibility.

Since you already tried to run the workflow, it should appear on the list there as a toggle switch, in which case you just need to switch it on. If it's not showing up, you can click the plus button at the bottom and add it manually.
 
Hey @jhollington, thanks for the tips! A couple of follow-ups:

In the AppleScript, it appears that we are setting the folder name properly...

1-script.png


...but when I run it from Mail, it pops up this massive window, prompting me to choose a folder:

make-your-selection.png


Ideally, this prompt wouldn't show at all. If I choose "Cancel" the message is moved to the correct folder, so long as the target folder exists on the top level of my account hierarchy.

If I target a nested folder in my email account, running this action returns an error:

nested-folders.png

So to move to a nested folder it seems like we need a way to insert the path to the target folder rather than just the name of the target folder.

Is this a dead-end or might there be some finessing we can do to get this particular software stack to work?

(Folder and account names have been changed to be generic)
 
I've answered one of my own questions:

To target nested folders in your account you use a forward slash so:

"Receipts/2024" would work.

Now to get rid of the redundant selection prompt...
 
  • Like
Reactions: jhollington
I've answered my other question:

To remove the redundant prompt remove this line from the script:

set targetfolder to choose from list of folderlist

I'll follow up a bit later with a full walk-thru for macOS Ventura (which is what I have). It will be very interesting to see if the same steps will work in Sonoma.
 
  • Like
Reactions: jhollington
Ok, I've got a quick one-take, unscripted screencast here for the full process of setting up Apple Mail keyboard shortcuts:


Do we have any takers to test it out? (Particularly anyone running Sonoma)

Here is the updated Applescript from @jhollington:

AppleScript:
    tell application "Mail"
 
    set myaccount to "mail account name in quotes"
    set folderlist to name of mailboxes in account myaccount
    set theMessages to selection
 
    repeat with eachMessage in theMessages
        set mailbox of eachMessage to mailbox "target folder name in quotes" of account myaccount
    end repeat
 
end tell


Once this solidifies a bit more I'll do a written version with screenshots and caveats/notes but it was quicker just to go through the process while recording it.

Also, the format for comments in Applescript is (* comment here *) so I've added this to the top of my scripts for documentation purposes:

AppleScript:
    (* myaccount name to match the human-readable name for the mail account that you want to copy mail into *)
    (* example myaccount name might be "Gmail" or "Work" *)
    (* if your target folder is on the top-level of your account, simply enter the folder name eg: "Newsletters" *)
    (* if your target folder is nested, use forward slashes to traverse the hierarchy eg: "Receipts/2024" *)
 
Last edited:
  • Like
Reactions: jhollington
Ok, I've got a quick one-take, unscripted screencast here for the full process of setting up Apple Mail keyboard shortcuts
Nice! I actually popped back in here to answer your earlier questions, but I was happy to see you got it all sorted out on your own — with pretty much exactly what I was about to say 😄

There's no reason I can see that this wouldn't work on Sonoma. I may run through it later when I have some time, just for fun, but I've got other Automator services tied to keyboard shortcuts through my system, and have had some of these set up for years, and they continue to work just fine .... and of course the Applescript in question is something I'm already using 😏

Also, I'm not sure if you noticed when you were trying out the original script, but the dialog box that comes up for folder selection does support keyboard input, so you can bring up the script with a keyboard shortcut and then just type the name of the folder you want to move to, Gmail-style.

Of course, your method is still far more efficient when dealing with only a relatively small set of routine folders.
 
  • Like
Reactions: strayduck
I've had a problem with the mail app for years.
Short Story:
I want to attach a JPG file to the client (who has windows), I do it in all possible ways (windows firendly, at the end / beginning of the message, RTF or plain text)
unfortunately, each time the client receives this JPG not as an attachment, but sewn into the email (so that he can't even save it on his hard drive.
The solution used to be a programmer's plugin, but unfortunately it has not worked for a few OSX.
The only thing I can do is send an empty email without any text - then this JPG is treated as an attachment.
I also discovered that if I send a file with some other extension in parallel with this JPG and the text of the email, then it goes as an attachment ...

Do you have any solution to this problem?
I will add that this only happens when I send to someone who has Windows.
A solution is to zip compress the JPEG, and then attach the zipped file.
 
  • Wow
Reactions: strayduck
the dialog box that comes up for folder selection does support keyboard input, so you can bring up the script with a keyboard shortcut and then just type the name of the folder you want to move to, Gmail-style.
Yeah, speed is the name of the game for me and I find Apple's "smart" move isn't right often enough to use the touchbar or cmd-shift-m so I need a set of keyboard shortcuts that do the same, predictable thing every time I hit them.

The dialog box option would be a great separate enhanced shortcut to use for lesser-used folders--something like command-f to "file". I think the keyboard here would still be faster and more enjoyable than drag-and-drop or traversing menus with the mouse or trackpad.

and of course the Applescript in question is something I'm already using 😏
Awesome! I hadn't read deep enough into the forums to know if you were using Sonoma or not. I haven't seen any screenshots for the new Mail app that suggested whether or not these scripts or services could be applied or not.
 
  • Like
Reactions: jhollington
Has anyone heared about MailMaven (the successor to MailSuite)?

The last I have read was from Juli 2023 and said that it should be released "later this year" (which means Autom 2023 to end of 2023).
 
Ok, I've got a quick one-take, unscripted screencast here for the full process of setting up Apple Mail keyboard shortcuts:


Do we have any takers to test it out? (Particularly anyone running Sonoma)

UPDATE: Circumstances dictated that I get my Apple silicon a few months earlier than I had planned, so I became my own Sonoma tester.

I am happy to report that the AppleScript+Keyboard Shortcuts work perfectly (not surprising) and the setup process is identical to Ventura.

I'm now happily filing messages into a dozen folders at lightning speed. ⚡️📨🥳
 
UPDATE 2:

@Apathist from another thread suggested that we could remove the following line from the mail-moving script:

AppleScript:
    set folderlist to name of mailboxes in account myaccount

I've tested this and confirmed that everything still works without it.

I also noticed that after filing messages, my inbox reverts to a state where no messages are highlighted. To save the extra keystroke (and also to avoid a very deep rabbit hole of determining what the "next" message in a mixed-account "All Inboxes" situation I added a second AppleScript to run after each mail filing action:


AppleScript:
(* only System Events can send keystrokes *)
(* we send a "down arrow" keystroke after filing mail to select the first message in the inbox *)

tell application "System Events"

    key code 125

end tell

It's a little fiddly to set up in terms of getting past permissions warnings, but once this is settled and working I'm going to write up a full article on it including references and credits.
 

Attachments

  • down-arrow.png
    down-arrow.png
    99.9 KB · Views: 58
UPDATE 2:

@Apathist from another thread suggested that we could remove the following line from the mail-moving script:

AppleScript:
set folderlist to name of mailboxes in account myaccount

I've tested this and confirmed that everything still works without it.

I also noticed that after filing messages, my inbox reverts to a state where no messages are highlighted. To save the extra keystroke (and also to avoid a very deep rabbit hole of determining what the "next" message in a mixed-account "All Inboxes" situation I added a second AppleScript to run after each mail filing action:


AppleScript:
(* only System Events can send keystrokes *)
(* we send a "down arrow" keystroke after filing mail to select the first message in the inbox *)

tell application "System Events"

key code 125

end tell

It's a little fiddly to set up in terms of getting past permissions warnings, but once this is settled and working I'm going to write up a full article on it including references and credits.

This is really good stuff. Thank you!

For those of you out there who have Keyboard Maestro, you can also use that to set up the keyboard shortcuts to execute the AppleScripts. It’s probably marginally easier than setting up the individual keyboard shortcuts in settings, but does require you to own KM.
 
UPDATE 3: I've run into a peculiar bug where moved messages sometimes reappear in my inbox.

IMAP and Exchange accounts work properly:
(1) Run move script via keyboard shortcut
(2) Confirm that message is in the destination folder
(3) Confirm that message is no longer in Apple Mail Inbox
(4) Log into webmail and confirm the message is gone from the SERVER Inbox folder
(5) All smiles


With GMail (Personal and Business)
(1) Run move script via keyboard shortcut
(2) Confirm that message is in the destination folder
(3) Confirm that message is no longer in Apple Mail Inbox
(4) BAD: Log into webmail. THE MESSAGE IS STILL ON SERVER INBOX
(5) BAD: Some minutes later, the message reappears in Apple Mail's Inbox (but not as "new/unread")
(6) GOOD: The original moved copy of the message is also still in the destination folder


Since I'm "Inbox Zero" (thus the keyboard shortcuts) I can use a REALLY UGLY workaround by creating a straight-up Apple Mail "rule" to move all incoming GMail into one of my IMAP Inboxes, but I'd obviously like for Google to see my command as "move" instead of "copy" (or "delete" since I'm moving to a folder in another account)

I've tried switching the AppleScript from:

AppleScript:
set mailbox of eachMessage to mailbox "2024 Receipts" of account myaccount

to:

AppleScript:
move eachMessage to mailbox "2024 Receipts" of account myaccount

...but the behavior is the same.

I've also deleted my GMail account and re-added to Apple mail. The behavior is the same.

I've also restarted my computer (just in case). The behavior is the same.

I'm not sure how to determine whose bug this is, Apple's (mail), Google's (sync support), or mine?
 
UPDATE 4: Sometimes you need to type out the problem publicly and read it to see that you've answered your own question. I've updated the script to:

(1) change "set/move" to "copy", followed by "delete"

(2) removed the second AppleScript for the "down arrow" action because the act of deleting a message automatically selects the next one in the list.

A couple of forced tests worked (including one with multiple messages selected) but I'll be scrutinizing this a bit more over the next week. Here is where the full script is at currently:

AppleScript:
(* Mail Mover 1.4 *)

(* "mail account name in quotes" should match the human-readable name for the mail account that you want to copy mail into *)

(* example myaccount name might be "Gmail" or "Work" *)

(* if your target folder is on the top-level of your account, change "target folder name in quotes" to the folder name eg: "Newsletters" *)

(* if your target folder is nested, use forward slashes to traverse the hierarchy eg: "Receipts/2024" *)

tell application "Mail"
   
    set myaccount to "mail account name in quotes"
    set theMessages to selection
   
    repeat with eachMessage in theMessages
        copy eachMessage to mailbox "target folder name in quotes" of account myaccount
        delete eachMessage
    end repeat
   
end tell
 
(4) BAD: Log into webmail. THE MESSAGE IS STILL ON SERVER INBOX
(5) BAD: Some minutes later, the message reappears in Apple Mail's Inbox (but not as "new/unread")
I'm not sure how to determine whose bug this is, Apple's (mail), Google's (sync support), or mine?
Most likely not a bug, more about how gmail behaves with IMAP. Gmail IMAP sync is tricky because it uses the concept of "Labels" which is similar but not quite the same as Folders.

I have it tamed by only IMAP syncing these System Labels: Inbox, Sent, Spam and Bin. In particular don't sync All Mail. You might or might not want to sync Drafts (I prefer not).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.