I'm writing a script to check if a particular web form has been submitted.
The script so far reads thusly:
tell application "Mail"
check for new mail
set newmail to get the unread count of inbox
repeat with msg in newmail
if msg's subject contains "New newsletter built by" then
return msg's subject
end if
end repeat
end tell
I've got an unread email in my inbox for the script to work with, but I still get an error:
error "Mail got an error: Can’t make 1 into type specifier." number -1700 from 1 to specifier
Any help at all will be appreciated.
Cheers!