2014-03-06 30 views
0

我想抓住電子郵件正文(在本例中,我使用電子郵件主題以避免任何文本格式問題)我是肯定這曾經工作: -從applescript中的規則獲取內容到郵件消息失敗

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. 

我也嘗試使用「重複與消息中的郵件」相同的結果。

我也嘗試插入多個延遲,因爲我讀到,這將有所幫助,但它沒有在這裏。

+0

我發現此問題只發生在POP消息中。解決方法是使用IMAP代替。 – marcovanbostin

回答

0

這似乎是Apple Mail如何處理傳入的POP消息的錯誤。我現在正在使用IMAP帳戶,這對我來說是一個可接受的解決方案。

相關問題