Deleting Message in Mail.app
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