Mail 2.0.1 (Tiger) Driving Me Crazy!

I have a funny feeling that the latest version of Mail.app has substantially changed its AppleScript syntax. I want to do something like this:


tell application "Mail"
delete every message whose read status is "true" and sender is "admin@macnn.com" 
end tell

But it doesn’t work and normal troubleshooting procedures have only led to frustration. Can I get some help with this? Thanks.

I can’t test this at the moment, but have you tried referring to a specific mailbox - either by name or index? For example:

[b]every message of mailbox “Apple” whose…

every message of mailbox 8 whose…

etc…[/b]

I don’t really use Mail and haven’t tested this but I doubt that it uses a string for the Boolean true. You also probably need to specify the mailbox that contains the messages to delete. Something like:

tell application "Mail"
	delete (messages of inbox whose read status = true and sender = "admin@macnn.com")
end tell

Jon