delete theMsg
But it would be safer (in case you found you mistakenly had just got rid of something you needed) to do this:
set read status of theMsg to read
That way you won't see those annoying bolded messages in the Deleted Items folder, but it's actually there if you need to fish it out.
--
Paul Berkowitz
On 6/4/01 8:03 PM, "contains_phenylalanine" <[EMAIL PROTECTED]> wrote:
Thanks; this works perfectly.
From: Paul Berkowitz <[EMAIL PROTECTED]>
Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
Date: Sun, 03 Jun 2001 16:48:12 -0700
To: Entourage mac Talk <[EMAIL PROTECTED]>
Subject: Re: Apple Script for removing message from server
On 6/3/01 4:21 PM, "contains_phenylalanine" <[EMAIL PROTECTED]> wrote:
Does anyone know of an Apple Script for removing message from server? My desire use is to have a rule and when its criteria are met the following actions will be run:tell application "Microsoft Entourage"
- Delete the message
- run Applescript (Applescript being delete message from server)
set theMsg to item 1 of (get current messages)
set theAccount to the account of theMsg
set connection action of theMsg to remove at next connection
delete theMsg
connect to theAccount
end tell
The last line connects to the server (and downloads more messages if any are there, although that's unlikely if this message just arrived), as well as removing this one from the server, just as in normal use. Or you can leave out that line, and it will be removed from the server at your next scheduled (or other) connection. Also, adding a second 'delete theMsg' will delete the local copy from the Deleted Items folder completely, if you never ever want to know about it.
