度々、失礼致します。
Oscar86 による書き込み:
「受信したメール」の指定がされていないようなのでまだうまくいきません。
1)この部分のスクリプトはどの様になっているのでしょうか?
2)受信したメール(メッセージ)のオブジェクトがあれば、そこからcontentのプロパティを取得します。 例えば、以下のスクリプトは、Macにインストールされていたメールルールのサンプルに少し手を加えたものですが(動作は未確認です)、set theContent to content of eachMessageの部分でメールの本文を取り出しています。
using terms from application "Mail"
on perform mail action with messagestheMessagesfor ruletheRule
tell application "Mail"
set theText to "This AppleScript is intended to be used as an AppleScript rule action, but is also an example of how to write scripts that act on a selection of messages or mailboxes." & return & return & "To view this script, hold down the option key and select it again from the Scripts menu."
repeat with eachMessage in theMessages
set theSubject to subject of eachMessage
set theContent to content of eachMessage
try
-- If this is not being executed as a rule action,
-- getting the name of theRule variable will fail.
set theRuleName to name of theRule
set theText to "The rule named '" & theRuleName & "' matched this message:"
set theText to theText & return & return & "Subject: " & theSubject
display dialogtheText
set theText to ""
end try
end repeat
if theText is not equal to "" then
display dialogtheTextbuttons {"OK"} default button 1
end if
end tell
end perform mail action with messages
end using terms from