I have a rule that triggers an applescript when a new email arrives from my mobile phone. - but I can’t seem to make Mail select the new email.
tell application "Mail"
set y to content of (message 0 of inbox)
end tell
tell application "Safari"
delay 5
open location "http://www.myURL.php?q=" & y
end tell
tell application "Safari" to quit
I tried “message 1 of inbox” as well.
It seems as though the applescript initiates before the message has downloaded.
In every test, it is using the content from the 2nd newest.
How can I make sure I’m grabbing the content of the new message???