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

Deleting Message in Mail.app


  • Subject: Deleting Message in Mail.app
  • From: Courtney Braafhart <email@hidden>
  • Date: Tue, 1 Feb 2005 13:48:09 -0600

I would like a script that deletes messages that are older then a certain date. I am having difficulty scripting the basic delete message command. Does anyone have any suggestions? Below is an example of what I am trying to do...script editor does not like the "delete message" part of the script.....
tell application "Mail"
set cnt to count of mailboxes
repeat until cnt = 0
set aname to name of mailbox cnt
set cnt to cnt - 1
set mcount to count of messages of mailbox aname
set msgcount to mcount
if msgcount > 0 then
repeat until msgcount = 0
if (date received) of message msgcount of mailbox aname < (current date) - 77760000 then delete message msgcount of mailbox aname
set msgcount to msgcount - 1
end repeat
end if
end repeat
end tell

 _______________________________________________
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

  • Follow-Ups:
    • Re: Deleting Message in Mail.app
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: open image sequence in quicktime
  • Next by Date: Re: open image sequence in quicktime
  • Previous by thread: Re: Copy paste in quicktime player.
  • Next by thread: Re: Deleting Message in Mail.app
  • Index(es):
    • Date
    • Thread