• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mail (delete aged msgs) scpt
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mail (delete aged msgs) scpt


  • Subject: Mail (delete aged msgs) scpt
  • From: martin <email@hidden>
  • Date: Sat, 4 Jun 2005 08:39:03 -0700

I've got the following script that has occasionally run in mail. I'm not sure whether it worked better in an earlier version of mail, but in it's current state it freezes mail(v2.0.1) when it hits certain mailboxes - seems like the mailboxes of more active lists - and times out. I have to force quit and restart mail. Any pointers to problems appreciated.

set deleteboxes to {"clayart", "applescript", "woodfire", "bamboo", "drugwar", "marxism", "lbo-talk", "xlist", "nettime"}
tell application "Mail"
set localMailboxes to every mailbox
if ((count of localMailboxes) is greater than 0) then
repeat with thismbox in localMailboxes
if name of thismbox is in deleteboxes then
my trasholdmessages(thismbox)
end if
end repeat
end if


end tell


on trasholdmessages(mboxname)

tell application "Mail"
set mailbox of every message of mboxname whose date sent is less than (current date) - 2 * days to mailbox "Trash"
end tell
end trasholdmessages


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: need something faster
  • Next by Date: Re: need something faster
  • Previous by thread: Re: need something faster
  • Next by thread: Intel Backslide
  • Index(es):
    • Date
    • Thread