Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mail rules in OS Mavericks 10.9 don't apply to Sent Messages

hello


does anyone have Mail working correctly with applying Mail Rules to Sent Messages?


i have Rules set up to put new Mail into various folders. This works as expected for incoming messages.


in previous OSX versions your Rules could be applied to Sent messages as well.


but in Mavericks it doesnt work (for me).


i have tried making new rules (not relying on previously set up rules), and still no go.


anyone?


thanks

MacBook Air (13-inch, Mid 2012), OS X Mountain Lion (10.8.2), iPhone 5, Time Capsule 1TB

Posted on Oct 25, 2013 9:56 AM

Reply
136 replies

Sep 4, 2016 12:39 PM in response to azamino

Depending on what you want to do, you can use an applescript script to do some things.


This script can be modified to move outbound messages to different folders:


using terms from application "Mail"

on perform mail action with messagestheSelectedMessagesfor ruletheRule

set messageList to {}

set x to messages in mailbox "Sent Messages" in account "<Account-1>" -- *1

set messageList to x

set x to messages in mailbox "Sent Messages" in account "<Account-2>"

set messageList to messageList & x

set x to messages in mailbox "Sent Messages" in account "<Account-3>"

set messageList to messageList & x

repeat with i from 1 to countitems in messageList

set msg to itemi of messageList

if all headers of msg contains "<trigger>" then -- *2

set mailbox of msg to mailbox "<destination mailbox>" of mailbox "Local" -- *3

end if

end repeat

end perform mail action with messages

end using terms from

Open Applications/Utilities/Script Editor.app

Cut and paste the above script.

Change all values between "<" and ">".

*1: If you have more accounts, add them. If you have fewer then delete the excess ones.

*2: Change 'trigger' to whatever identifies the message you want to move.

*3: Set your destination mailbox.

Save the script with a meaningful name: You have to place the script in folder: /Users/<your id>/Library/Application Scripts/com.apple.mail/

Create a rule in Mail for "All Messages" and select 'Run Applescript' as the action, then select your script from the drop down.

Your script will run whenever new mail arrives.

For those script experts out there, this was my first one, so take it easy on me.

Mail rules in OS Mavericks 10.9 don't apply to Sent Messages

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.