Im adding code to this script http://applescript.net/viewtopic.php?id=19644
I know things are missing but just tell me am I on the right road with whats here…
using terms from application "Mail"
on perform mail action with messages actionMail for rule actionRule
tell application "Mail"
repeat with i from 1 to count of actionMail
set thisMail to item i of actionMail
set theSubject to the subject of thisMail
set theBody to (the content of thisMail) as text
set theBody to my getFirstLine(theBody)
---Starts Verify Idenity??? check lines/compare 2 and 10 for secret phrase
set theBody to my getSecondLine(theBody)
set theBody to my getTenthLine(theBody)
set getPassPhrase2 to "2"
set getPassPhrase10 to "10"
if (getSecondLine(theBody) is equal to getPassPhrase2) then
if (getTenthLine is equal to getPassPhrase10) then --proced
try --4
if theSubject contains "<launch>" then --3
my launchApp(theBody)
else if theSubject contains "<say>" then
my sayThis(theBody)
else if theSubject contains "<do>" then
my doShell(theBody)
else if theSubject contains "<send>" then
my sendThis(theBody)
else if theSubject contains "<put>" then
set attachName to the name of the first mail attachment of thisMail
try --2
save first mail attachment of thisMail in theBody & attachName
on error
set newMessage to make new outgoing message with properties {subject:"I was not able to put the file you sent in the requested place"}
tell newMessage --1
make new to recipient at end of to recipients with properties {address:"dan.watson.vns@adelphia.net"}
end tell --1
send newMessage
end try --2
else if theSubject contains "<script>" then
do shell script "osascript -e '" & theBody & "'"
end if
end try
end if
else if getSecondLine(theBody) is not getPassPhrase2 then
delete thisMail
else if getTenthLine(theBody) is not getPassPhrase10 then
delete thisMail
end if
end repeat
end tell
end perform mail action with messages
end using terms from