Applescript邮件-脚本赢得';不要越过&x27';在使用消息执行邮件操作时,规则的消息;
我已经建立了一个规则,当一封来自某个发件人的电子邮件收到时,会触发一个Applescript。我希望Applescript从邮件中提取内容,触发将要发送到PHP脚本的规则,PHP脚本将其作为webhook发送到数据库。 除了“在执行邮件操作时使用messages theMessages for rule theRule”之外,所有功能都正常运行,它只是跳过该代码块,永远不会到达重复块 我做错了什么 如果你需要更多的信息,我很乐意提供 提前谢谢Applescript邮件-脚本赢得';不要越过&x27';在使用消息执行邮件操作时,规则的消息;,applescript,Applescript,我已经建立了一个规则,当一封来自某个发件人的电子邮件收到时,会触发一个Applescript。我希望Applescript从邮件中提取内容,触发将要发送到PHP脚本的规则,PHP脚本将其作为webhook发送到数据库。 除了“在执行邮件操作时使用messages theMessages for rule theRule”之外,所有功能都正常运行,它只是跳过该代码块,永远不会到达重复块 我做错了什么 如果你需要更多的信息,我很乐意提供 提前谢谢 set d_recd to missing valu
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)
do shell脚本
行必须位于处理程序内部。您必须引用所有参数并强制日期为文本
最后还有一个输入错误:它是接收日期
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
repeat with theMessage in theMessages
set theDate to date received of theMessage
set theText to content of theMessage
set theSender to sender of theMessage
do shell script "php -q /Users/kaartendrukkerijmacmini/Dropbox/Technische_ontwikkeling/PHP_Webhook_approval_post.ctp " & quoted form of (theDate as text) & space & quoted form of theText & space & quoted form of theSender
end repeat
end perform mail action with messages
end using terms from
如果根本没有调用处理程序,那么问题就出在其他地方