Problem with that is that the script isn't actually sending the message, so
there's no way to delete it.

Two possible approaches:

1.  Write the message id of the forwarded message out to a file to preserve
it. Each time this script is called, read in that file and check to see if
those ids have a delivery status of 'sent', and delete them if so. This is
messy, and relies on the script being run from time to time.

2.  set up a second script to be run from a schedule that will check the
sent mail folder for forwarded messages to that address and delete them.

The other way to work it would be to get the script to send immediately,
then the script could wait until all messages are sent before exiting. This
would have an unfortunate side effect that script execution seriously slows
down entourage, so the delay would be noticeable to the user :(

So, no clean solution I can see.


-- 
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the All-New Entourage Help Pages? - Check them out:
        <http://www.entourage.mvps.org/>


> From: Scott Haneda <[EMAIL PROTECTED]>
> Reply-To: "Entourage:mac Talk" <[email protected]>
> Date: Tue, 15 Mar 2005 01:22:37 -0800
> To: "Entourage:mac Talk" <[email protected]>
> Subject: quick help with a script
> 
> I have the below script, it takes a selected message and forwards it to a
> special address, then it moved the originally selected message to the
> Junk-Email Folder.
> 
> Right now I have a outgoing rule to delete any emails destined for this
> special address, but it would be a lot easier for me to share this script if
> if could simply clean up after itself, meaning I would like to to delete the
> message it has sent once it is sent.
> 
> tell application "Microsoft Entourage"
>     set msgList to current messages
>     repeat with oneMsg in msgList
>         try
>             if address of address of (first recipient of oneMsg) does not
> start with "postmaster@" then
>                 set theFwd to forward oneMsg to "[EMAIL PROTECTED]"
> without opening window
>                 send theFwd with sending later
>             end if
>         end try
>         move oneMsg to folder id 6
>     end repeat
> end tell
> -- 
> -------------------------------------------------------------
> Scott Haneda                                Tel: 415.898.2602
> <http://www.newgeo.com>                     Fax: 313.557.5052
> <[EMAIL PROTECTED]>                          Novato, CA U.S.A.
> 
> -- 
> To unsubscribe:  
> <mailto:[EMAIL PROTECTED]>
> archives:       
> <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
> old-archive:     
> <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
> 


-- 
To unsubscribe:                     
<mailto:[EMAIL PROTECTED]>
archives:       
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:       
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to