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

Applescript to move contents of one email folder to another

Our new cloud based mail system automatically deletes an item out of the Deleted Items folder when it has been deleted for 30 days. I am attempting to create an applescript that will run daily and move the contents from the Deleted Items folder to a second folder, titled "Trash" to prevent from permanently losing the items that are deleted. Here is what I have so far:


on run

tell application "Microsoft Outlook"

move every message of mail folder "Deleted Items" to mail folder "Trash"

end tell

end run


When I run the script as is above, nothing happens. I created two test folders (Test 1, Test 2) and when I place a few emails in Test 1 and rerun the script with the updated folder names (move every message of mail folder "Test 1" to mail folder "Test 2"), I can get them to move. Can this not be done on a 'built-in' folder like Deleted Items??? Any suggestions are greatly appreciated.

iMac, OS X Mountain Lion (10.8.2)

Posted on Oct 15, 2013 12:02 PM

Reply
3 replies
Sort By: 

Oct 22, 2013 2:21 PM in response to Tony T1

Thanks, Tony T1. That's exactly what I was missing. I modifed the script and it worked fine:


on run

tell application "Microsoft Outlook"

move every message of mail folder "Deleted Items" of exchange account "my account name" to mail folder "Trash"

end tell

end run

Reply

Applescript to move contents of one email folder to another

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