Я пытаюсь получить все письма от определенной учетной записи (как у меня четыре) с определенной темой, а затем взять содержимое этих писем и записать их в приложение для работы с числами с помощью AppleScript.
В теле письма содержатся личные данные, такие как электронная почта, дата рождения и т. Д., Которые я пытаюсь упорядочить по столбцам.Каждое новое письмо отправляется в свою собственную строку.
Если вы знаете решение, которое включает в себя Javascript или Automator, я открыт для него.
Вот что у меня есть сейчас:
tell application "Numbers"
set LinkRemoval to make new document
set theSheet to active sheet of LinkRemoval
set value of cell "D1" of table 1 of theSheet to "E-mail"
set value of cell "C1" of table 1 of theSheet to "Year Of Birth"
set value of cell "B1" of table 1 of theSheet to "Name"
set value of cell "A1" of table 1 of theSheet to "Phone Number"
end tell
tell application "Mail"
set theRow to 2
set theAccount to "MyAccount"
get account theAccount
set theMessages to {messages of inbox whose read status is false and subject contains "Application 2019"}
set theContent to content of theMessages
end tell
on SetMessage(theMessage, theRow, theSheet)
tell application "Numbers"
set theRange to "D" & theRow
set formula of range theRange of theSheet to theContent
end tell
end SetMessage
К сожалению, я получаю сообщение об ошибке:
ошибка "Не удается получить содержимое {{id сообщения 33410 почтового ящика \" INBOX \ "идентификатора учетной записи \" 22ED50FB-BF71-4D0A-A96B-9A78E4F57C8 \ "приложения \" Почта \ "
У кого-нибудь есть решение этой проблемы? Что я сделал не так?