• 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
Re: Script for mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script for mail


  • Subject: Re: Script for mail
  • From: Michelle Steiner <email@hidden>
  • Date: Sat, 15 Aug 2009 20:50:49 -0700

On Aug 15, 2009, at 8:22 PM, Sutapalli Satyanarayana wrote:

Hi, I am trying to write the script for deleting mails that are older than 15 days from a sub folder of Mac mail. I created a rule that will move the messages to a a subfolder according to rule. can somebody provide me the skeleton of the script to achieve it?

I couldn't come up with a skeleton, but here's the entire script:

tell application "Mail"
delete (messages of mailbox "a sub folder" of mailbox "a folder" whose date received is less than ((current date) - 15 * days))
end tell

--
I'm at an age where I can satisfy my wants without too many guilt feelings.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Script for mail (From: "Sutapalli Satyanarayana" <email@hidden>)

  • Prev by Date: Script for mail
  • Next by Date: iCal events to a list
  • Previous by thread: Script for mail
  • Next by thread: iCal events to a list
  • Index(es):
    • Date
    • Thread