Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to forward spam to the FTC via Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to forward spam to the FTC via Mail
Authored by: renderhead on Feb 24, '06 05:32:56AM
I adapted this to replace my "Erase Junk Mail" command. Save this script in the location of your choice, then use Butler or Quicksilver or something to map a keyboard shortcut. I just use the script menu, personally.

tell application "Mail"
	set theMailboxes to mailboxes in junk mailbox
	repeat with thisMailbox in theMailboxes
		set theMessages to messages in thisMailbox
		repeat with thisMessage in theMessages
			set newMessage to make new outgoing message at end of outgoing messages
			tell newMessage
				set content to thisMessage's source
				set subject to thisMessage's subject
				make new to recipient with properties {address:"spam@uce.gov"}
			end tell
			send newMessage
			delete thisMessage
		end repeat
	end repeat
end tell
This works if you have multiple accounts within mail, since your Junk mailbox contains a mailbox for each account within it. If you only have one account, and consequently have no sub-folders within Junk, this would probably work as well (though I haven't tested it):

tell application "Mail"
	set theMailboxes to messages in junk mailbox
	repeat with thisMessage in theMessages
		set newMessage to make new outgoing message at end of outgoing messages
		tell newMessage
			set content to thisMessage's source
			set subject to thisMessage's subject
			make new to recipient with properties {address:"spam@uce.gov"}
		end tell
		send newMessage
		delete thisMessage
	end repeat
end tell


[ Reply to This | # ]
An AppleScript to forward spam to the FTC via Mail
Authored by: tjpeistr on Mar 27, '06 04:17:38PM

The script works great (I modified b/c I also use the BlueFrog service, so I email to both FTC and to BlueFrog) -- however, I haven't been able to modify the script to delete the "sent" message. Since the 90% plus of my email is spam (200+ daily), my "sent" folders are filled up with FTC/BlueFrog spam forwards. Any suggestions?



[ Reply to This | # ]