Emailanhang per Email Regeln in einen Ordner auf der HDD automatisch verschieben..

Lawineolly

Mitglied
Thread Starter
Dabei seit
14.12.2009
Beiträge
88
Reaktionspunkte
0
Hi Leute,

folgende Problemstellung:

Wir (20 Leute) im Office erhalten Faxe per Email von eFax, nun würde ich gerne eine Regel erstellen, womit man die Anhänge (Faxe als PDF) einer Email direkt auf der Festplatte in einem Ordner speichern lassen kann. Diesen ordner synce ich dann mit meiner Cloud, und auf diese greifen dann die Kollegen zu.

Mein Problem dabei ist, dass keine Regel-Aktion vorgesehen ist, die eine Emailanlage auf dem Rechner abspeichert, bis auf die Regel-Aktion: AppleScript ausführen.....

Ich kann mir vorstellen, dass man ein solches script locker schreibt, nur habe ich da 1. keine Ahnung von, und 2. keine Zeit mich da stundenlang reinzuarbeiten, um dann scripten zu können... Ich habs per Aufnahmefunktion im AppleScript probiert, aber das wird und wird nichts...

Vielleicht hat einer eine Lösung für mich, oder ein solches script....

Zur Not würde mir auch reichen, die ganze Email samt Anhang in einen Ordner auf der Festplatte zu verschieben... Aber nur wenns nicht anders gehen sollte...

Danke für Eure Antworten!

PS: Aktuell nutze ich das Emailprogramm von Apple "Email", vielleicht liegt die Lösung im Emailprogramm- Wechsel...
 
Irgendjemand hat mal dieses Skript verfasst, das sollte funktionieren:

Code:
[FONT="Verdana"][size=2][b]using terms from[/b] [color=#0000FF][i]application[/i][/color] "Mail"
	[b]on[/b] [color=#0000FF][b]perform mail action with messages[/b][/color] [color=#3F7F00]theMessages[/color] [color=#0000FF]for rule[/color] [color=#3F7F00]theRule[/color]
		
		[b]set[/b] [color=#3F7F00]theOutputFolder[/color] [b]to[/b] "Macintosh HD:Users:Mein Name:Desktop:"
		
		
		[b]tell[/b] [color=#0000FF][i]application[/i][/color] "Mail"
			[b]set[/b] [color=#3F7F00]theMessage[/color] [b]to[/b] [color=#0000FF][i]item[/i][/color] 1 [b]of[/b] [color=#3F7F00]theMessages[/color]
			[b]set[/b] [color=#3F7F00]theAttachments[/color] [b]to[/b] [b]every[/b] [color=#0000FF][i]attachment[/i][/color] [b]of[/b] [color=#6C04D4]content[/color] [b]of[/b] [color=#3F7F00]theMessage[/color]
			[b]repeat[/b] [b]with[/b] [color=#3F7F00]a[/color] [b]from[/b] 1 [b]to[/b] [color=#6C04D4]length[/color] [b]of[/b] [color=#3F7F00]theAttachments[/color]
				[b]set[/b] [color=#3F7F00]theAttachment[/color] [b]to[/b] [color=#0000FF][i]item[/i][/color] [color=#3F7F00]a[/color] [b]of[/b] [color=#3F7F00]theAttachments[/color]
				[b]try[/b]
					[b]set[/b] [color=#3F7F00]theAttachmentName[/color] [b]to[/b] [color=#6C04D4]name[/color] [b]of[/b] [color=#3F7F00]theAttachment[/color]
					[b]set[/b] [color=#3F7F00]theSavePath[/color] [b]to[/b] [color=#3F7F00]theOutputFolder[/color] & [color=#3F7F00]theAttachmentName[/color]
					[color=#0000FF][b]save[/b][/color] [color=#3F7F00]theAttachment[/color] [color=#0000FF]in[/color] [color=#3F7F00]theSavePath[/color]
				[b]end[/b] [b]try[/b]
			[b]end[/b] [b]repeat[/b]
		[b]end[/b] [b]tell[/b]
		
	[b]end[/b] [color=#0000FF][b]perform mail action with messages[/b][/color]
[b]end[/b] [b]using terms from[/b][/size][/FONT]
 
Danke Pill!!!

Habs so geändert, muss ich ausser der "theOutputFolder"- Zeile noch etwas ändern?

Code:
[B]using terms from application "Mail"
	on perform mail action with messages theMessages for rule theRule
		
		[COLOR="#FF0000"]set theOutputFolder to "HD:Benutzer:oliverrueckert:Dokumente:geschäft:Dokumente:eFaxe:Aktuelle Faxe"[/COLOR]
		
		
		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[/B]

LG
Olly
 
Zuletzt bearbeitet:
Oh Mist geht leider nicht... naja trotzdem danke!

Vielleicht hat ja ein anderer ne Idee...
 
Gerade gesehen, am Ende deines Speicherpfades muss ein Doppelpunkt hin.
 
hm... geht trotzdem nicht..

Was ist mit dem Freizeichen zwischen "...Aktuelle & Faxe..."? Muss ich das mit Unterstrich verbinden?
 
Leerzeichen sind egal, überprüfe nochmal den Pfad, wahrscheinlich sollte dein Skript so aussehen:

Code:
[FONT="Verdana"][size=2][b]using terms from[/b] [color=#0000FF][i]application[/i][/color] "Mail"
	[b]on[/b] [color=#0000FF][b]perform mail action with messages[/b][/color] [color=#3F7F00]theMessages[/color] [color=#0000FF]for rule[/color] [color=#3F7F00]theRule[/color]
		[b]set[/b] [color=#3F7F00]theOutputFolder[/color] [b]to[/b] "Macintosh HD:Users:oliverrueckert:Dokumente:geschäft:Dokumente:eFaxe:Aktuelle Faxe:"
		[b]tell[/b] [color=#0000FF][i]application[/i][/color] "Mail"
			[b]set[/b] [color=#3F7F00]theMessage[/color] [b]to[/b] [color=#0000FF][i]item[/i][/color] 1 [b]of[/b] [color=#3F7F00]theMessages[/color]
			[b]set[/b] [color=#3F7F00]theAttachments[/color] [b]to[/b] [b]every[/b] [color=#0000FF][i]mail attachment[/i][/color] [b]of[/b] [color=#3F7F00]theMessage[/color]
			[b]repeat[/b] [b]with[/b] [color=#3F7F00]a[/color] [b]from[/b] 1 [b]to[/b] [color=#6C04D4]length[/color] [b]of[/b] [color=#3F7F00]theAttachments[/color]
				[b]set[/b] [color=#3F7F00]theAttachment[/color] [b]to[/b] [color=#0000FF][i]item[/i][/color] [color=#3F7F00]a[/color] [b]of[/b] [color=#3F7F00]theAttachments[/color]
				[b]try[/b]
					[b]set[/b] [color=#3F7F00]theAttachmentName[/color] [b]to[/b] [color=#6C04D4]name[/color] [b]of[/b] [color=#3F7F00]theAttachment[/color]
					[b]set[/b] [color=#3F7F00]theSavePath[/color] [b]to[/b] [color=#3F7F00]theOutputFolder[/color] & [color=#3F7F00]theAttachmentName[/color]
					[color=#0000FF][b]save[/b][/color] [color=#3F7F00]theAttachment[/color] [color=#0000FF]in[/color] [color=#3F7F00]theSavePath[/color]
				[b]end[/b] [b]try[/b]
			[b]end[/b] [b]repeat[/b]
		[b]end[/b] [b]tell[/b]
	[b]end[/b] [color=#0000FF][b]perform mail action with messages[/b][/color]
[b]end[/b] [b]using terms from[/b][/size][/FONT]
 
Hm... das kann dann eigentlich nur am Pfad liegen, bei mir unter 10.7.4 funktioniert das so. Aber vielleicht weiss jemand anderes ja noch was.
 
Nur so ins Blaue geraten: kann das "ä" in geschäft der Übeltäter sein???
 
Am ä liegt es nicht, evtl. muss statt dem ersten "Dokumente" "Documents" geschrieben werden.
 
Bildschirmfoto 2012-05-11 um 17.58.19.jpg

das ist der Pfad, siehe Bild...
 
Dann könnte der Pfad "HD:Users:eek:liverrueckert:Documents:Geschäft:Dokumente:eFaxe:AktuelleFaxe:" sein. Du kannst es ja auch mal mit diesem hier versuchen: "HD:Users:eek:liverrueckert:". Dann müsste der Anhang in deinem Benutzerordner landen.
 
Probier mal dieses Skript aus, da sind noch ein paar Kleinigkeiten anders als bei deiner Version. Am Besten mit diesem Pfad:
Code:
HD:Users:oliverrueckert:Documents:geschäft:Dokumente:eFaxe:AktuelleFaxe:
 
GEILLL!!!! :clap:GEEHT!!!!:music: Pill DU bist der määään!:cool: Danke Dir 1000fach! Danke MU! Danke allen anderen die ich vergessen habe... :clap:
 
Hi Pill & all,

ich richte dieses Script gerade auf einem anderen Mac ein, da hat die Festplatte aber keinen Titel, "ohne Titel", was kann ich denn da anstelle von "HD:..." eingeben?

Liebe Grüße
 
Klappt der Pfad

Code:
"ohne Titel:Users:oliverrueckert:Dokuments:Geschäft:Dokumente:eFaxe:AktuelleFaxe:"

nicht?
 
Danke Pill,

habs auf HD geändert, und dann gings wunderbar.... Danke Dir!

LG
Olly
 
Zurück
Oben Unten