I'm trying to setup an applescript for Mail so that it will delete messages based on these 2 conditions. condition one 1. mailbox folder is "Temp Save" 2. subject contains the word digest 3. and the date sent is one or more days old condition two 1. mailbox folder is "Temp Save" 2. delete all messages older than 5 days Here's the script i wrote. but i can't get the line with subject to work. -=-= tell application "Mail" set localMailboxes to "Temp Save" if message subject contains "Digest" then if date sent is not today then delete message end if else if date sent is greater than 5 then delete message end if end if end tell -=-=-= here's the error message: tell application "Mail" get subject "Mail got an error: Can't make subject into type reference." any applescript gurus out there? John