Soy nuevo en Applescript, intentando hacer un script básico al que se llama desde una regla de correo.
Estoy atascado en conseguir el tema. Parece que no hay uno disponible.
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
Entonces,
¿Cómo obtener el correo electrónico real y sus valores?
Me di cuenta de que era automático en el bucle para cada elemento.