moonman239 moonman239 - 26 days ago 6
AppleScript Question

UTF-8 error attempting to read e-mail message: "Can't make <> of <> id 9574 of <> "INBOX" of <> "Gmail" into type <>."

I'm trying to retrieve the body of any e-mail that triggers my AppleScript. I have a test message saved, and when I click "Apply Rules", I get this error:

"Can't make <> of <> id 9574 of <> "INBOX" of <> "Gmail" into type <>."

EDIT: Here's the relevant portion of the code:

using terms from application "Mail"
on perform mail action with messages messageList for rule aRule
tell application "Mail"
repeat with thisMessage in messageList
try
say content of thisMessage
on error errMsg
display alert errMsg
end try
end repeat
end tell
end perform mail action with messages
end using terms from

Answer

Try:

say (content of thisMessage as text)