M
mikemobile
Neues Mitglied
Thread Starter
- Dabei seit
- 09.05.2013
- Beiträge
- 7
- Reaktionspunkte
- 0
Hallo Zusammen
Ich möchte ein Script schreiben was folgenden macht:
Es verschiebt E-Mail aus der Inbox (IMAP) in einen spezifischen Ordner anhand der folgenden Regeln:
Mit dem Script sollen alle Newsletter, welche von Mail automatisch ein Flag erhalten, nach 2 archiviert werden.
Vielen Dank, Michael
----------
-- how old the message should be
set modDate to (2)
-- which flag the message must have
set theFlag to 4 -- Starts with 0
-- which account should be checked
set theMailbox to "mn@fd.ch"
-- target folder
set theMailboxFolder to "01 Newsletter"
tell application "Mail"
-- repeat with theMessage in (every message) of (mailbox "INBOX" of account theMailbox)
repeat with theMessage in (every message of mailbox "INBOX" of account 1)
if flag index of theMessage is equal to theFlag and date received of theMessage is less than ((current date) - modDate * days) then
set mailbox of theMessage to mailbox theMailboxFolder of account theMailbox
end if
end repeat
end tell
Ich möchte ein Script schreiben was folgenden macht:
Es verschiebt E-Mail aus der Inbox (IMAP) in einen spezifischen Ordner anhand der folgenden Regeln:
- Die E-Mail muss in der Inbox sein
- Die E-Mail muss ein bestimmtes Flag haben
- Die E-Mail muss min. 2 Tage alt sein
Mit dem Script sollen alle Newsletter, welche von Mail automatisch ein Flag erhalten, nach 2 archiviert werden.
Vielen Dank, Michael
----------
-- how old the message should be
set modDate to (2)
-- which flag the message must have
set theFlag to 4 -- Starts with 0
-- which account should be checked
set theMailbox to "mn@fd.ch"
-- target folder
set theMailboxFolder to "01 Newsletter"
tell application "Mail"
-- repeat with theMessage in (every message) of (mailbox "INBOX" of account theMailbox)
repeat with theMessage in (every message of mailbox "INBOX" of account 1)
if flag index of theMessage is equal to theFlag and date received of theMessage is less than ((current date) - modDate * days) then
set mailbox of theMessage to mailbox theMailboxFolder of account theMailbox
end if
end repeat
end tell