Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gcortes

macrumors member
Original poster
Jul 13, 2011
90
1
Redwood City, California
I wrote an AppleScript to move certain email to the trash. Moving them to trash works fine, but the emails don't get removed from the server. I have the account set to removed them immediately and all other emails not processed by my AppleScript get removed. I'm thinking I need to add some additional code to the script to get that done. Any idea what that would be?

Here's the pertinent code:

Code:
set theAccount to account of mailbox of this_message
set mailbox of this_message to mailbox "Trash" of theAccount

The script exits afterwards
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.