mail issue
mail issue
- Subject: mail issue
- From: dstevens <email@hidden>
- Date: Tue, 14 Nov 2006 13:07:43 -0700
There must be an easier way...
I receive a confirmation that mail has arrived, and it contains a
download link.
I have a rule sending the "online file transfers" to a mailbox of the
same name.
<sample e-mail>
A file was sent to you via your Web site:
Company: zzz
Download the file using the link below:
http://url/files/filename.zip
</sample e-mail>
Instead of manually selecting the mail and the link, I'd like to
script it.
I'm piecing it together but need help.
Is there a way to check unread mails only? (instead of selecting them)
Is there a way of putting the retrieved file in a specific location?
Can this be simplified?
<script>
global myMessages
tell application "Mail"
set myMessages to selection
using terms from application "Mail"
tell application "Mail"
tell mailbox "Online File Transfers"
repeat with theMessage in myMessages
set theText to content of theMessage
set thepartIneed to the (offset of "Download using link
below:" in theText)
set getthis to items (thepartIneed + 40) thru end of theText
as string
set getthis to paragraph 1 of getthis
tell application "Safari"
make new document at end of documents
set URL of document 1 to getthis
end tell
end repeat
end tell
end tell
end using terms from
end tell
</script>
--
David Stevens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden