Mac OS X Technologies

Trigger mail rules with Automator

Hello.

I want to trigger the running of Mail rules on a specific mailbox folder, using Automator. I'd run this every hour.

Specifically, I want to run rules on messages in my junk mail folder to delete the obvious junk, making it easier to then spot real messages that have been accidentally classified as junk. I can force the rules to run by selecting the folder, selecting all messages, then using 'apply rules'. The rules don't run automatically, I believe because Hotmail has already run rules on the server to place them in Junk in the first place, marking the messages as 'seen' in the process. Mail doesn't run rules on 'seen' messages.

I'm a complete Automator/applescript newbie. Can anyone tell me how to achieve this?

So far I have tried using 'get specified mail items' and 'get selected mail messages' to choose the correct messages, but can't work out how to then run existing Mail rules on them.

I've also tried recording selecting the Junk folder, pressing cmd-a (select all) and cmd-opt-l (apply rules), but this gives an error about clicking static text.

Many thanks,

Bob

Click to rate this post!
[Total: 0 Average: 0]

Related posts

What is the "Droplet with Settable Properties" and do I need it?

Elena

Minimize Mail window Applescript Question marked as solved ★ Latest reply  by  APPLEAL Latest update on the question 2 replies 7 views asked by  APPLEAL User profile for user: dkaiser92 dkaiser92 User level: Level 1 Applescript How to make this selection as a taget path?

Axel

eject all Question marked as solved ★ Latest reply  by  APPLEAL Latest update on the question 1 reply 10 views asked by  APPLEAL User profile for user: APPLEAL APPLEAL User level: Level 2 else if Question marked as solved ★ Latest reply  by  APPLEAL Latest update on the question 2 replies 15 views asked by  APPLEAL User profile for user: neal105 neal105 User level: Level 1 Automation to convert .XLSX file to .CSV, then save to new subfolder

Lamaxima

Leave a Comment