• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Viele hassen ihn, manche schwören auf ihn, wir aber möchten unbedingt sehen, welche Bilder Ihr vor Eurem geistigen Auge bzw. vor der Linse Eures iPhone oder iPad sehen könnt, wenn Ihr dieses Wort hört oder lest. Macht mit und beteiligt Euch an unserem Frühjahrsputz ---> Klick

Mail Anhänge automatisch sichern

columbo1979

Empire
Registriert
04.05.17
Beiträge
86
Hallo,

ich suche nach einer Möglichkeit, welche PDF Dateien aus Mails automatisch unter Downloads speichert.
Vieles im Netz gefunden (über Automator oder auch Scripts) welche alle nicht wirklich funktionieren.

Jemand ein Tipp?

Zuletzt:

using terms from application „Mail“

on perform mail action with messages theMessages for rule theRule

tell application „Mail“

repeat with oneMessage in theMessages

set {mail attachment:theAttachments} to oneMessage

repeat with oneAttachment in mail attachments of oneMessage

save oneAttachment in („/Users/xxx/Downloads“) & (name of oneAttachment)

end repeat

end repeat

end tell

end perform mail action with messages

end using terms from

Aber auch dies geht leider nicht :(

Gruß und danke schon mal
 

columbo1979

Empire
Registriert
04.05.17
Beiträge
86
Danke dir. leider klappt auch dieses Script nicht:

on perform_mail_action(ruleData)

-- The folder to save the attachments in (must already exist)
set attachmentsFolder to ((path to home folder as text) & "Documents:Attachments") as text

-- Save in a sub-folder based on the name of the rule in Mail
set subFolder to name of |Rule| of ruleData as text
tell application "Finder"
if not (exists folder subFolder of folder attachmentsFolder) then
make new folder at attachmentsFolder with properties {name:subFolder}
end if
end tell

-- Get incoming messages that match the rule
tell application "Mail"
set selectedMessages to |SelectedMessages| of ruleData
repeat with theMessage in selectedMessages

-- Get the date the message was sent
set {year:y, month:m, day:d, hours:h, minutes:min} to theMessage's date sent
set timeStamp to ("" & y & "-" & my pad(m as integer) & "-" & my pad(d) & "-" & my pad(h) & "-" & my pad(min))

-- Save the attachment
repeat with theAttachment in theMessage's mail attachments
set originalName to name of theAttachment
set savePath to attachmentsFolder & ":" & subFolder & ":" & timeStamp & " " & originalName
try
save theAttachment in savePath
end try
end repeat
end repeat
end tell

end perform_mail_action