Apple Mail - Report Spam

Summary: Forwards selected spam messages to spam@uce.gov.
Requires: Apple Mail
Install Location: ~/Library/Scripts/Applications/Mail/
Last Modified: 2019-10-02

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 ISP’s policies before using this script.

Installation Instructions · 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