Delete mail based on content

I am looking for help with a script that will look at email, and if it contains this exact content, deletes or purges the mail. (From an IMAP mailbox named WORDPRESS)

"For immediate release.

Army"

You will have to pardon me, as I know absolutely NOTHING about writing code. Sure wish there was software out there that could read my mind and write the script.

TIger

Browser: Firefox 3.0.10
Operating System: Mac OS X (10.5)

wow, I would have thought that was an easy one. :frowning:

Hi,
give this a try!

set search_text to "For immediate release.



    Army"

tell application "Mail"
	set unread_messages to (every message of inbox whose read status is false)
	if unread_messages is not {} then
		repeat with this_message in unread_messages
			set the_content to content of this_message
			if (the_content as text) contains (search_text as text) then
				delete this_message
			end if
		end repeat
	end if
end tell

Thanks,
Nik