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: tj2001 on Feb 23, '06 02:33:07PM
Okay I think I properly implemented the "delete" feature I was asking about:
tell application "Mail"
	set theMessages to the selection
	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
		set read status of thisMessage to true
		delete thisMessage
	end repeat
end tell
Also, you could probably remove the line:
set read status of thisMessage to true
Is this right or is there a better method? I'm not a keen Applescriptor this was just from opening the "Library" for Mail and adding that function :)

---
--- www.macdynamix.com ---
:: Super Me I Am ::

[ Reply to This | # ]