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