Advertisement
MrVulcan

forward spam to spamcop.net and/or uce.gov

Mar 13th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script can be used to submit e-mail messages to SpamCop.net.
  2. -- I'd like to have this script look up the contact named SpamCop, and copy the e-mail address found there.
  3. -- Who knows how?
  4.  
  5. -- Please save the script here: ~/Library/Scripts/Applications/Mail
  6. -- If the Mail directory does not exist, you can make it.
  7.  
  8. tell application "Mail"
  9.     set SpamItems to selection
  10.     repeat with SpamItem in SpamItems
  11.         set SpamItemSource to source of SpamItem
  12.         set SpamReport to make new outgoing message with properties {visible:true}
  13.         tell SpamReport
  14.             -- Remove the dashes from 1 of the following lines of code, to use it.
  15.             -- Remove the dashes from the line below to send spam to uce.gov.
  16.             -- make new to recipient with properties {name:"UCE", address:"spam@uce.gov"}
  17.             -- Remove the dashes from the line below to send spam to spamcop.net.
  18.             -- make new to recipient with properties {name:"SpamCop", address:"your SpamCop address"}
  19.             -- You can make your own SpamCop address at https://www.spamcop.net.
  20.             set subject to subject of SpamItem
  21.             if subject of SpamReport is "" then set subject of SpamReport to "Spam Report"
  22.             -- Please enter your own name and e-mail address in the line below.
  23.             set sender to "Your Name <you@yourisp.com>"
  24.             set content to SpamItemSource
  25.             send
  26.         end tell
  27.         delete SpamItem
  28.     end repeat
  29. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement