Removing Messages from the server with AppleScript and Mail

Does anyone know if you can use AppleScript within to remove messages from the server? I’ve looked at Mail’s dictionary and it doesn’t appear to have anything that would do it. Within Mail itself the only way to do it is to hit ‘Apple/Cmd - I’, select the messages you want deleted and then hit ‘Remove from Server’. You can do it in preferences but only by choosing to delete them either when they are moved from your ‘Inbox’ (too broad) or after a specific time period (not refined enough). I switch computers and locations several times a day, need to have all my (real) mail downloaded to each machine (and thus use POP mail) and it is a real pain to have to remove 40 some odd spam messages a day from each computer.

Any thoughts or help on the matter would be greatly appreciated!


Obviously this didn’t get answered. I have a similar question, though different issue.

Quite a few people are being driven mad by multiple duplicate messages on POP3 accounts in, since upgrading to 10.6. Apple don’t seem to be doing anything about it, so I was hoping I could just create an applescript to manually delete messages (selected in the viewer window) from the server, without needing to go into the account “Get Info” panel, etc …

It’s not looking hopeful from a general google search or - so far - from searching this forum.

Can anyone offer anything? Thanks.

Model: macbook2.16
AppleScript: 2.3
Browser: Safari 531.21.10
Operating System: Mac OS X (10.6)