email - AppleScript and Mail.app: checking if new messages contain a string -


i'm writing script check if particular web form has been submitted.

the script far reads thusly:

tell application "mail" check new mail set newmail unread count of inbox repeat msg in newmail     if msg's subject contains "new newsletter built by"         return msg's subject     end if end repeat end tell 

i've got unread email in inbox script work with, still error:

error "mail got error: can’t make 1 type specifier." number -1700 1 specifier 

any @ appreciated.

cheers!

tell application "mail"     check new mail     repeat until (background activity count) = 0         delay 0.5 --wait until new messages in box     end repeat     try         return subject of (first message of inbox read status false , subject contains "new newsletter built ")     end try end tell 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -