Hallo Leute,
ich möchte gerne, abhängig vom Inhalt der Betreffzeile einer mail, die Anlagen dieser mail in einem speziellen Ordner ablegen.
Mir ist klar, dass ich mit einer Regel die Mails automatisch in einen lokalen Mail-Ordner verschieben kann aber den möchte ich nicht benutzen.
Ich möchte die Anlagen gerne auf einem Netzlaufwerk ablegen.
Kann bitte jemand helfen???
Vielen Dank im voraus
Peter
Bei meiner Suche habe ich folgendes script (funktioniert aber nicht) gefunden:
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
set theOutputFolder to "xyzHD:Groups:Beispiel:INBOX:"
tell application "Mail"
set theMessage to item 1 of theMessages
set theAttachments to every attachment of content of theMessage
repeat with a from 1 to length of theAttachments
set theAttachment to item a of theAttachments
try
set theAttachmentName to name of theAttachment
set theSavePath to theOutputFolder & theAttachmentName
save theAttachment in theSavePath
end try
end repeat
end tell
end perform mail action with messages
end using terms from
ich möchte gerne, abhängig vom Inhalt der Betreffzeile einer mail, die Anlagen dieser mail in einem speziellen Ordner ablegen.
Mir ist klar, dass ich mit einer Regel die Mails automatisch in einen lokalen Mail-Ordner verschieben kann aber den möchte ich nicht benutzen.
Ich möchte die Anlagen gerne auf einem Netzlaufwerk ablegen.
Kann bitte jemand helfen???
Vielen Dank im voraus
Peter
Bei meiner Suche habe ich folgendes script (funktioniert aber nicht) gefunden:
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
set theOutputFolder to "xyzHD:Groups:Beispiel:INBOX:"
tell application "Mail"
set theMessage to item 1 of theMessages
set theAttachments to every attachment of content of theMessage
repeat with a from 1 to length of theAttachments
set theAttachment to item a of theAttachments
try
set theAttachmentName to name of theAttachment
set theSavePath to theOutputFolder & theAttachmentName
save theAttachment in theSavePath
end try
end repeat
end tell
end perform mail action with messages
end using terms from