Korzystanie z Applescript w celu uzyskania tematu wiadomości e-mail - Nie działa w reklamie


1

Jestem nowym użytkownikiem Applescript, próbując wykonać podstawowy skrypt, który jest wywoływany z reguły pocztowej.

Utknąłem na zdobyciu tematu. Nie wydaje się, aby był dostępny.

using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
        repeat with aMess in theMessages
            try
                set subj to subject of aMess
                (*
                aMess has only one property, "contents"  =
                message 1 of mailbox "Incoming POP Messages" of account id "CD180EE3-9A52-4623-BBF0-F722556AF94A"

                *)
                if subj is "" then error
            on error errMsg
                (* errMsg is 
            osascript got an error: Can’t get subject of message 1 of mailbox "Incoming POP Messages" of account id "CD180EE3-9A52-4623-BBF0-F722556AF94A".
            clearly it cant get subject because it has only "contents" property
            How to get the actual email and it's values ?
            *)
                set subj to errMsg
            end try
            display dialog "The Subject is " & subj
        end repeat
    end tell
end perform mail action with messages
end using terms from

Więc,

Jak uzyskać aktualny adres e-mail i jego wartości?

Pomyślałem, że to automatyczna pętla dla każdego przedmiotu.


Czy to Mojave? Ponieważ mówię „ustaw temat do tematu wiadomości” przez cały czas, ale nie używam Mojave. Wygląda na to, że masz większe bezpieczeństwo.
Marc Wilson

Zgaduję, ale jestem na wysokim Sierra 10.13.6. Poczta to wersja 11.5.
Greg Humphrey
Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.