• 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: Deleting Message in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deleting Message in Mail.app


  • Subject: Re: Deleting Message in Mail.app
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 2 Feb 2005 12:48:20 -0700

On Feb 2, 2005, at 12:21 PM, Courtney Braafhart wrote:

I tried the following but I am still getting an error message on the delete and ideas?:

set today to current date
tell application "Mail"
delete (messages of this_Mailbox in mailboxes whose date received is less than today - (13 * days))
end tell

Loop through the messages and delete them one at a time.

set today to current date
tell application "Mail"
set msgs to (messages of this_Mailbox in mailboxes whose date received is less than today - (13 * days))
repeat with thisMsg in msgs
delete thisMsg
end repeat
end tell


If that doesn't work, try this:

set today to current date
tell application "Mail"
set msgs to (messages of this_Mailbox in mailboxes whose date received is less than today - (13 * days))
repeat with loop from 1 to count msgs
delete item loop of msgs
end repeat
end tell


Your script should work, but apparently there's a bug in mail's Applescripting that prevents it from working.

-- Michelle

--
I've noticed lately that the paranoid fear of computers becoming intelligent and taking over the world has almost entirely disappeared from the common culture. Near as I can tell, this coincides with the release of MS-DOS.
-- Larry DeLuca


_______________________________________________
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


References: 
 >Deleting Message in Mail.app (From: Courtney Braafhart <email@hidden>)
 >Re: Deleting Message in Mail.app (From: Michelle Steiner <email@hidden>)
 >Re: Deleting Message in Mail.app (From: Christopher Nebel <email@hidden>)
 >Re: Deleting Message in Mail.app (From: Courtney Braafhart <email@hidden>)

  • Prev by Date: Re: Deleting Message in Mail.app
  • Next by Date: Itunes make playlist + convert song to mp3 + add to playlist.
  • Previous by thread: Re: Deleting Message in Mail.app
  • Next by thread: download a file with a progress bar question
  • Index(es):
    • Date
    • Thread