【发布时间】:2020-11-05 19:42:07
【问题描述】:
我已经设置了一个规则,当一封来自某个发件人的电子邮件时,Applescript 会被触发。我希望 Applescript 从邮件中提取触发规则的内容,以将其发送到 PHP 脚本,该脚本将其作为 webhook 发送到数据库。 一切正常,除了代码不会运行过去'on perform mail action with messages theMessages for rule theRule',它只是跳过该代码块并且永远不会到达重复块。
我做错了什么?
如果您需要更多信息,我很乐意提供。
提前致谢!
set d_recd to missing value
set theText to missing value
set theSender to missing value
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
repeat with theMessage in theMessages
set theDate to date recieved of theMessage
set theText to content of theMessage
set theSender to sender of theMessage
end repeat
end perform mail action with messages
end using terms from
do shell script ("php -q /Users/kaartendrukkerijmacmini/Dropbox/Technische_ontwikkeling/PHP_Webhook_approval_post.ctp " & d_recd & space & theText & space & theSender)
【问题讨论】:
标签: applescript