Re: Entourage X delete emails for good.
Re: Entourage X delete emails for good.
- Subject: Re: Entourage X delete emails for good.
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 21 May 2002 12:32:49 -0700
On 5/21/02 9:41 AM, "Jason Bourque" <email@hidden> wrote:
>
Hello,
>
>
What do I need to do to delete an email from any folder and delete every
>
occurrence even on the server?
>
>
>
Thanks,
>
That all depends on whether your server is IMAP or POP, and whether your
message is in a local folder or an IMAP folder to begin with.
If you're talking about local messages in local folders, which may or may
not still also be on a POP server depending how you've set your preferences,
do this. I'll presume that you've defined your message somewhere as 'theMsg'
already.
tell application "Microsoft Entourage"
set serverStatus to online status of theMsg
if serverStatus /= not on server then
set connection action of theMsg to remove at next connection
set theAccount to account of theMsg
connect to theAccount -- or wait until a repeat loop for many such
messages is over and 'connect to every POP account'
end if
delete theMsg -- puts into deleted items folder
delete theMsg -- gets rid of it for good
end tell
If it's an IMAP message in a server folder on an IMAP account, then they
are only expunged from the IMAP deleted items folder when quitting. This
should be enough:
delete theMsg
-- set delete all expired IMAP messages on quit to true -- Entourage X
only (just to be sure of the settings)
quit
If you're not sure if your script will be used with local or IMAp messages,
find out right at the beginning:
set theAccount to account of theMsg
set theClass to class of theAccount
if theClass is POP account then
--do the first script, (leave out 'set theAccount' line, since done)
else if theClass is IMAP account
--do the second script
else if theClass is Hotmail account -- hope for the best
delete theMsg -- that's all you can do
end if -- can't do anything about news messages in a cache
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.