[英]Getting the content to a mail message from a rule in applescript fails
我正在尝试获取电子邮件的正文(在本示例中,我使用电子邮件主题来避免文本格式的任何问题),我确信这可以正常工作:-
using terms from application "Mail"
on perform mail action with messages theMessages
tell application "Mail"
activate
set theMessage to item 1 of theMessages
try
set theMessageSubject to the subject of theMessage
on error errMsg
display dialog "Error: " & errMsg
end try
end tell
end perform mail action with messages
end using terms from
RESULT -> Error: Can't get <<class mssg>> 1 of <<class mact>> "Incoming POP Messages" of <<class mact>> "My Email Account". Invalid Index.
我也尝试过使用“在theMessages中与theMessage重复”相同的结果。
我还尝试插入多个延迟,因为我读到这会有所帮助,但这里没有。
Apple Mail如何处理传入的POP消息似乎是一个错误。 我现在改为使用IMAP帐户,这对我来说是可以接受的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.