Ich habe eine Regel erstellt, dass Nachrichten in einen Unterordner verschieben, wenn sie nach bestimmten Kriterien. Zusätzlich habe ich in dieser Regel ein AppleScript gespeichert, das diese Mail nachträglich in ein DMS kopierte. Es funktioniert.Applescript für Mail-Regeln
Mein Problem ist, dass der Name des Unterordners (vorerst) nicht an das Skript übergeben wird. Es enthält nur "INBOX":
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with theMessage in theMessages
set nameAccount to name of mailbox of theMessage # here is the problem !
try
tell theMessage
— at this point get the data out of the mail
end tell
tell application id „DMS“
— here the data will save to the dms
end tell
end try
end repeat
end tell
# end try
# end tell
end perform mail action with messages
end using terms from
Wie bekomme ich den Namen des Zielordners aus der aktiven Mailregel?