Push-Nachrichten von MacTechNews.de
Würden Sie gerne aktuelle Nachrichten aus der Apple-Welt direkt über Push-Nachrichten erhalten?
Forum>Software>Mails automatisch in monatliches postfach verschieben

Mails automatisch in monatliches postfach verschieben

chiller20.02.1313:22
Gibt es eine Möglichkeit, dass die Mails auf meinem Mac automatisch in ein Postfach verschoben werden, welches wie der aktuelle Monat heißt.
z.Bsp. im Februar werden alle Emails nach 2 Tagen in ein Postfach gelegt, welches Februar heißt und März wird ein neues Postfach erstellt welches März heißt und dorthin werden dann die Mails vom März verschoben.

Ist das möglich?
0

Kommentare

_mäuschen
_mäuschen20.02.1314:01
chiller


Ist das möglich?

Ja, das ist möglich!
0
Corky
Corky20.02.1314:16
Ja ist möglich.

In dem du in Mail sogenannte Regeln definierst.

Am besten du suchst mal im Web nach "Mail Regeln definieren".

Oder schaust die mal den hier an (einer der Suchergebnisse)
0
virk
virk20.02.1315:58
Chiller, dann denk auch kurz darüber nach, das mit "intelligenten Postfächern" (Menü "Postfach/Neues intelligentes Postfach...") zu machen. In der Art wie: Gesamte email empfangen im Zeitraum von 01.02.2013 bis 28.02.2013)
„Gaststättenbetrieb sucht für Restaurant und Biergarten Servierer:innen und außen.“
0
_mäuschen
_mäuschen20.02.1316:12
Mit "intelligenten Postfächern" wird nicht verschoben, nur gespiegelt.
0
mactelge
mactelge20.02.1316:42
mäuschen

...jetzt rück mal mit der Lösung raus, du kannst das!
„Dreh´dich um – bleib´wie du bist – dann hast du Rückenwind im Gesicht!“
0
_mäuschen
_mäuschen20.02.1316:46
Ja, aber dann muss man wieder so viel erklären und schreiben
0
_mäuschen
_mäuschen20.02.1316:46
set secondsIn2Days to 172800
tell application "Mail"
set theInbox to inbox
set dateToday to current date
set firstMessage to 1
set lastMessage to (get count of messages in theInbox)
repeat with thisMessage from lastMessage to firstMessage by -1
set currentMessage to message thisMessage of theInbox
set messageDate to date received of currentMessage
set timeDifference to dateToday - messageDate
if timeDifference ≥ secondsIn2Days then
set yearMonthBox to ((year of messageDate) as string) & space & ((month of messageDate) as string)
if not (exists mailbox yearMonthBox) then
make new mailbox with properties {name:yearMonthBox}
end if
move currentMessage to mailbox yearMonthBox
end if
end repeat
end tell
0
mactelge
mactelge20.02.1316:50
chiller

siehste, so einfach ist das!
„Dreh´dich um – bleib´wie du bist – dann hast du Rückenwind im Gesicht!“
0
mactelge
mactelge20.02.1318:50
mäuschen

Saubere Arbeit! Kann ich gut gebrauchen!

...was müsste man denn machen, damit die Monatsnamen auch in meiner Heimatsprech erscheinen?
„Dreh´dich um – bleib´wie du bist – dann hast du Rückenwind im Gesicht!“
0
chiller20.02.1318:57
Danke für die Hilfe

_mäuschen
set secondsIn2Days to 172800
tell application "Mail"
set theInbox to inbox
set dateToday to current date
set firstMessage to 1
set lastMessage to (get count of messages in theInbox)
repeat with thisMessage from lastMessage to firstMessage by -1
set currentMessage to message thisMessage of theInbox
set messageDate to date received of currentMessage
set timeDifference to dateToday - messageDate
if timeDifference ≥ secondsIn2Days then
set yearMonthBox to ((year of messageDate) as string) & space & ((month of messageDate) as string)
if not (exists mailbox yearMonthBox) then
make new mailbox with properties {name:yearMonthBox}
end if
move currentMessage to mailbox yearMonthBox
end if
end repeat
end tell


gibt es da auch eine möglichkeit dass die Postfächer in der iCloud gespeichert werden?
0
_mäuschen
_mäuschen20.02.1319:03
mactelge,
Was is denn deine Heimsprech
0
_mäuschen
_mäuschen20.02.1319:08
chiller,
nope.
Kein sync von intelligenten oder lokalen Ordnern

https://discussions.apple.com/thread/3970800?start=0&tstart=0
0
mactelge
mactelge20.02.1319:27
mäuschen

Na so, wie hier manchmal geschrieben wird: deutsch.
„Dreh´dich um – bleib´wie du bist – dann hast du Rückenwind im Gesicht!“
0
_mäuschen
_mäuschen20.02.1319:50
Ach so. Dann füge zuoberst ein
set monthNames to {"Januar", "Februar", "März", "April", "May", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}

und ändere

set yearMonthBox to ((year of messageDate) as string) & space & ((month of messageDate) as string)
zu
set yearMonthBox to ((year of messageDate) as string) & space & ((item (month of messageDate) of monthNames) as string)
0
chiller20.02.1319:51
was muss ich machen, dass nur die gelesenen nachrichten verschoben werden?
0
mactelge
mactelge20.02.1320:01
mäuschen

Du hast Alles richtig gemacht. Es geht.

Dankeschön
„Dreh´dich um – bleib´wie du bist – dann hast du Rückenwind im Gesicht!“
0
_mäuschen
_mäuschen20.02.1320:05
Ändere

move currentMessage to mailbox yearMonthBox

zu
if (read status of currentMessage) is true then
move currentMessage to mailbox yearMonthBox
end if
0
Lyhoo
Lyhoo20.02.1320:07
_mäuschen
chiller,
nope.
Kein sync von intelligenten oder lokalen Ordnern

https://discussions.apple.com/thread/3970800?start=0&tstart=0
Doch!
set secondsIn2Days to 172800
tell application "Mail"
set theInbox to inbox
set Wolke to account "iCloud"
set dateToday to current date
set firstMessage to 1
set lastMessage to (get count of messages in theInbox)
repeat with thisMessage from lastMessage to firstMessage by -1
set currentMessage to message thisMessage of theInbox
set messageDate to date received of currentMessage
set timeDifference to dateToday - messageDate
if timeDifference ≥ secondsIn2Days then
set yearMonthBox to ((year of messageDate) as string) & space & ((month of messageDate) as string)
if not (exists mailbox yearMonthBox) then
set Postfach to make new mailbox with properties {name:yearMonthBox} at Wolke
end if
move currentMessage to mailbox Postfach
end if
end repeat
end tell
0
virk
virk20.02.1320:15
_mäuschen
Mit "intelligenten Postfächern" wird nicht verschoben, nur gespiegelt.

BTW: Ich glaube/denke, dass nicht gespiegelt, sondern "nur" in Echtzeit aus den Postfächern neu zusammengestellt wird.
„Gaststättenbetrieb sucht für Restaurant und Biergarten Servierer:innen und außen.“
0
chiller20.02.1320:19
Lyhoo
_mäuschen
chiller,
nope.
Kein sync von intelligenten oder lokalen Ordnern

https://discussions.apple.com/thread/3970800?start=0&tstart=0
Doch!
set secondsIn2Days to 172800
tell application "Mail"
set theInbox to inbox
set Wolke to account "iCloud"
set dateToday to current date
set firstMessage to 1
set lastMessage to (get count of messages in theInbox)
repeat with thisMessage from lastMessage to firstMessage by -1
set currentMessage to message thisMessage of theInbox
set messageDate to date received of currentMessage
set timeDifference to dateToday - messageDate
if timeDifference ≥ secondsIn2Days then
set yearMonthBox to ((year of messageDate) as string) & space & ((month of messageDate) as string)
if not (exists mailbox yearMonthBox) then
set Postfach to make new mailbox with properties {name:yearMonthBox} at Wolke
end if
move currentMessage to mailbox Postfach
end if
end repeat
end tell

bei mir kommt der fehler:
mailbox "2013 January" of account "iCloud" kann nicht in Typ integer umgewandelt werden.
0
thomasammac20.02.1320:20
Das ist ziemlich interessant. Wo fügt man den Code ein? Könntet ihr wohl bitte einem helfen, der sich mit so etwas noch nicht beschäftigt hat?

Die monatliche Ausgabe / Speicherung befinde ich für sehr nützlich.

-Werden die Monate dann automatisch angelegt?
-Womöglich noch mit Jahreszahl dahinter?
0
Lyhoo
Lyhoo20.02.1320:22
Ja hab schon gemerkt daß ein Fehler drin ist.
0
Lyhoo
Lyhoo20.02.1320:30
set secondsIn2Days to 172800
tell application "Mail"
set theInbox to inbox
set Wolke to account "iCloud"
set dateToday to current date
set firstMessage to 1
set lastMessage to (get count of messages in theInbox)
repeat with thisMessage from lastMessage to firstMessage by -1
set currentMessage to message thisMessage of theInbox
set messageDate to date received of currentMessage
set timeDifference to dateToday - messageDate
if timeDifference ≥ secondsIn2Days then
set yearMonthBox to ((year of messageDate) as string) & space & ((month of messageDate) as string)
if not (exists mailbox yearMonthBox of Wolke) then
make new mailbox with properties {name:yearMonthBox} at Wolke
end if
move currentMessage to mailbox yearMonthBox of Wolke
end if
end repeat
end tell
0
chiller20.02.1320:35
Danke für eure Hilfe. Jetzt funktioniert alles perfekt.
0
thomasammac20.02.1320:48
Hier ebenfalls danke, ich habe es selbst gefunden, wo ich scripts aufrufen kann. Nur, wie ich das Script jetzt umsetze (bzw. wie abspeichere), das hab ich nicht verstanden.

Erledigt, Script Editor...

Oh mann, manchmal sieht man den Wald vor Bäumen nicht...
0
_mäuschen
_mäuschen20.02.1321:56
Lyhoo
_mäuschen
chiller,
nope.
Kein sync von intelligenten oder lokalen Ordnern

https://discussions.apple.com/thread/3970800?start=0&tstart=0
Doch!

Ja. Syncen eines iCloud Postfachs (Ordner) funktioniert natürlich.

Was aber machst Du mit "nicht Mail Accounts"?
0
Lyhoo
Lyhoo21.02.1307:43
_mäuschen
Lyhoo
_mäuschen
chiller,
nope.
Kein sync von intelligenten oder lokalen Ordnern

https://discussions.apple.com/thread/3970800?start=0&tstart=0
Doch!

Ja. Syncen eines iCloud Postfachs (Ordner) funktioniert natürlich.

Was aber machst Du mit "nicht Mail Accounts"?

Ich habe es mit einer Mail aus meinem Strato Account getestet. Ich habe auch gestaunt: Die Mail war aus dem Strato Account veschwunden und lag bei iCloud.
Ob so ein Vorgehen die Übersichtlichkeit erhöht, bleibt dahingestellt.
0
Lyhoo
Lyhoo21.02.1308:24
Ich habe mal das Puzzle zusammengesetzt und die erste Zeile geändert:
set secondsIn2Days to days * 2
set monthNames to {"Januar", "Februar", "März", "April", "May", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}
tell application "Mail"
set theInbox to inbox
set Wolke to account "iCloud"
set dateToday to current date
set firstMessage to 1
set lastMessage to (get count of messages in theInbox)
repeat with thisMessage from lastMessage to firstMessage by -1
set currentMessage to message thisMessage of theInbox
set messageDate to date received of currentMessage
set timeDifference to dateToday - messageDate
if timeDifference ≥ secondsIn2Days then
set yearMonthBox to ((year of messageDate) as string) & space & ((item (month of messageDate) of monthNames) as string)
if not (exists mailbox yearMonthBox of Wolke) then
make new mailbox with properties {name:yearMonthBox} at Wolke
end if
if (read status of currentMessage) is true then
move currentMessage to mailbox yearMonthBox
end if
end if
end repeat
end tell

thomasammac,

entweder:
im Scripteditor auf Ablage - Exportieren...
Im Dialog unten 'Programm' wählen.

Das neue Programm zu den Anmeldeobjekten hinzufügen. (Systemeinstellungen / Benutzer / Anmeldeobjekte)

oder:
im Scripteditor auf Ablage - Sichern...
sichern in Library / Application Scripts / com.apple.mail
in Mail auf Mail - Einstellungen...
auf Regeln
Regel hinzufügen
Eine Regel definieren. Z.B. 'An' 'enthält' meine Mail Adresse
Bei Folgende Aktionen durchführen 'Applescript ausführen'
Script auswählen (Wahrscheinlich ist das schon automatisch eingestellt)
0
_mäuschen
_mäuschen21.02.1313:41
So gefällt's mir nun besser
0
chiller25.03.1318:42
Was muss ich schreiben, dass es ein Postfach mit dem Jahr also z.B. 2013 macht und in diesem Postfach die Postfächer für jeden Monat macht also Januar, Februar, März...
0
_mäuschen
_mäuschen25.03.1320:32
Ändern…

Oh, angehängte Bilder sehen Sche…e aus
set days2 to 2
set dateToday to current date
set monthNames to {"Januar", "Februar", "März", "April", "May", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}
tell application "Mail"
set theCloud to account "maeuschen@mac.com"
set unreadMessages to ¬
(get every message of mailbox "INBOX" of theCloud whose read status is true)
repeat with aMessage in unreadMessages
set messageDate to date received of aMessage
set timeDifference to (dateToday - messageDate) / days
if timeDifference ≥ days2 then
set yearBox to ((year of messageDate) as string)
set monthBox to ((item (month of messageDate) of monthNames) as string)

if not (exists mailbox yearBox of theCloud) then ¬
make new mailbox with properties {name:yearBox} at theCloud

if not (exists mailbox monthBox of mailbox yearBox of theCloud) then ¬
make new mailbox with properties {name:yearBox & "/" & monthBox} at theCloud

move aMessage to mailbox monthBox of mailbox yearBox of theCloud
end if
end repeat
end tell
0
thomasammac25.03.1320:42
@ Lyhoo

hab vielen Dank, ich hoffe, ich hab das hinbekommen
0
chiller25.03.1320:48
Danke
0
o.wunder
o.wunder26.03.1302:38
Wo ist der Sinn einer monatlichen Speicherung?

Ich mache das anders:
Auf dem Server des Providers lasse ich alle Mails in einen Archiv Ordner kopieren. Auf dem Mac kann ich dann beliebig den Posteingang löschen. Die Mails befinden sich ja noch im Archiv Ordner und zwar ein Jahr lang ( einstellbar). Den Archiv Ordner kann ich einfach nach Datum sortieren. fertig.
0

Kommentieren

Diese Diskussion ist bereits mehr als 3 Monate alt und kann daher nicht mehr kommentiert werden.