• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
mail issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: mail issue
      • From: dev_sleidy <email@hidden>
  • Prev by Date: Sending event from Filemaker Pro 8.5
  • Next by Date: Re: Photoshop measure tool
  • Previous by thread: re: Sending event from Filemaker Pro 8.5
  • Next by thread: Re: mail issue
  • Index(es):
    • Date
    • Thread