Entourage - Discard Spam

Summary: Completely deletes the messages in the Spam folder.
Requires: SpamSieve, Entourage
Install Location: ~/Documents/Microsoft User Data/Entourage Script Menu Items/
Last Modified: 2010-11-27

Description

Running this script from the Scripts menu will completely delete all the messages in the Spam folder (rather than putting them in the trash).

If you’re using a different name for your spam folder, you’ll need to change "Junk E-mail" to the name of your spam folder.

Installation Instructions · Download in Compiled Format · Download in Text Format

Script

property spamFolderName : "Junk E-mail"

tell application "Microsoft Entourage"
    
set theIDs to {}
    
repeat with m in messages of folder spamFolderName
        
copy m's ID to end of theIDs
    
end repeat
    
repeat with theID in theIDs
        
set m to message id theID of folder spamFolderName
        
delete m
        
set m to message id theID of folder "Deleted Items"
        
delete m
    
end repeat
end tell