azamino

Q: 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

Close

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

  • All replies
  • Helpful answers

first Previous Page 10 of 10
  • by crashmeister,

    crashmeister crashmeister Sep 4, 2016 12:39 PM in response to azamino
    Level 1 (4 points)
    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 messages theSelectedMessages for rule theRule

    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 count items in messageList

    set msg to item i 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.


first Previous Page 10 of 10