Hi,
This is my very first attempt at an Applescript. Be patient. Don't laugh.
I really like Thunderbird's 'Smart' folders and wanted to emulate it in Mail app.
I have a rule set up which copies all mail less than one day old in to a folder named 'Today's Mail'. Other rules then filter mail into various folders but this means that I have one folder with a copy of all todays mail in it.
All I want to do is ensure that any mail received before 'Today' is moved to the trash automatically.
Obviously this should be very simple to do but I can't make it work...
Here is my effort:
Code:
on perform_mail_action(info)
tell application "Mail"
move eachMessage
received
before theDate
current_date to the mailbox "Trash"
end tell
end perform_mail_action
I don't get any errors running or compiling this in Apple's Script Editor but it just doesn't work.
I want to invoke the script as part of a Mail Rule.
Help!
(Stop Laughing)
Thanks
Simon
London Uk
