Mailsmith
Other Programs
Scripts
Mailsmith.scpt
Archive to sub-mailbox
Check Spelling
Find reply
Change font size
Submit Script to JEM
Fix common spelling errors
Setting SMTP server
URL from Safari
Address from AB
linkMunge
Export to Address Book
Saving attachments
Digest Script
File with same
POP window position
Position of new windows
iCal and Mailsmith
Edit From Line
Modified Thread Script
Reply to Selection
Temporary Text Window
Compact gain
Tracking backups
Edit subject
Googler
Auto-rewrap
MMA
SMTP server
Open, fetch, and close
URL Manager
BrainForest
Thread by Author
Thread by subject
Export Email
Get Selection
Read Addresses
Export Email
Organize Email
Account setup
Mailsmith 2 BBEdit
BBEdit 2 Mailsmith
Search II
Check One
Delete Enclosure
Open, fetch, close
Set Answered
Set Redirected
Empty Trash
List found
Print Several
Del. old. msg.
Delete Enclosures
Accounts
Address Book
Editing
Filters
General
Import/Export
Links
Mailboxes
Memory
Scripting
Speed
send/receive
Tips/Tricks


Empty Trash on Quit

Author Rich Siegel
Last modified 1998-11-03
What is this?
To delete message in trash, put this script in the "Mailsmith Shutdown Items" folder

tell application "Mailsmith 1.1"
    
    --
    --  logic: if there are any messages in the trash, delete them.
    --  Piece o' cake.
    --
    
    set msgs to (every message of trash)
    if ((count of msgs) > 0) then
        
        --
        --  here we make sure that the user *really* wants to empty the
        --  trash. If you don't want to be warned, comment out the
        --  "display dialog" statement, and the "if" clause following
        --  it, and the next "end if", so that the resulting code
        --  just reads:
        --
        --      delete every message of trash
        --
        
        display dialog ¬
            "Are you sure you want to discard the messages in the trash?" buttons {"Yes", "No"} ¬
            default button 1
        
        if button returned of the result is "Yes" then
            delete every message of trash
        end if
    end if
    
end tell