FTP-Link in Mail bei Empfang mit Downloaden

macsvenson

Erdapfel
Registriert
13.08.17
Beiträge
2
Hallo,

ich habe viele Emails mit FTP-Downloadlinks die ich alle einzeln downloade. Ich habe versucht eine Regel zu erstellen, aber leider nichts gefunden um die Links beim Empfang einer solchen Email gleich mit zu laden.

Gibt es da eine Möglichkeit?
 

macsvenson

Erdapfel
Registriert
13.08.17
Beiträge
2
Ich habe ein Script erstellt und will mir nur die isolierte Zeile anzeigen lassen (myFTP) - geht noch nicht ;-(
Der gesamte Inhalt - myContent - funktioniert, der wird angezeigt.

Code:
using terms from application "Mail"
    on perform mail action with messages theDetectedMessages for rule theRule
        tell application "Mail"
            set theMessageCount to count of theDetectedMessages
            repeat with a from 1 to theMessageCount
                set theCurrentMessage to item a of theDetectedMessages
                -- Process the message
                set myContent to content of theCurrentMessage
                set offFTPstart to (offset of "ftp:" in myContent)
                set offFTPend to (offset of ".zip" in myContent)
                set myFTP to text from offFTPstart to offFTPend
                display dialog myFTP
            end repeat
        end tell
    end perform mail action with messages
end using terms from