Apple Mail - Report Spam

Summary: Forwards selected spam messages to spam@uce.gov.
Requires: Apple Mail
Install Location: ~/Library/Scripts/Applications/Mail/

Description

Choosing this script from the Scripts menu will report the selected spam messages to the Federal Trade Commission (FTC).

The script reports the spams by forwarding the e-mails to spam@uce.gov. (You could also modify the script to report the spam to spam@icloud.com.) Although this is the standard way to report spam messages, some ISPs (e.g. Comcast) may notice the messages being sent from your account and think that you are a spammer. They may then restrict access to your account. Be sure that you understand your ISPs policies before using this script.

Download in Compiled Format · Download in Text Format

Script

tell application "Mail"
    
set theMessages to the selection
    
repeat with theMessage in theMessages
        
set newMessage to make new outgoing message at end of outgoing messages
        
tell newMessage
            
set content to (theMessage's source as Unicode text)
            
set subject to theMessage's subject
            
make new to recipient with properties {address:"spam@uce.gov"}
        
end tell
        
send newMessage
    
end repeat
end tell

Last Modified: 2014-05-14

Running the Script

You can use Script Editor (a.k.a. AppleScript Editor or AppleScript Utility) to enable Mac OS X’s built-in Script menu. Download the compiled script file and install it in the Install Location recommended above, creating any necessary folders. To run the script, just select it from the menu. FastScripts provides a similar menu that supports keyboard shortcuts and other features.