• 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
Re: Mail - Extract Links
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail - Extract Links


  • Subject: Re: Mail - Extract Links
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 25 Nov 2013 15:31:26 +1100

On 25 Nov 2013, at 2:52 PM, Christopher Stone <email@hidden> wrote:

Contents of a message doesn't pick up embedded links.

Data-Detectors doesn't pick up links broken by quoted-printable.

You have a handy routine for decoding mail source?

This sort of thing?

use framework "Foundation"

on decodeQP:theString
set theString to current application's NSString's stringWithString:theString
set theString to theString's stringByReplacingOccurrencesOfString:("=" & return & linefeed) withString:""
set theString to theString's stringByReplacingOccurrencesOfString:("=" & return) withString:""
set theString to theString's stringByReplacingOccurrencesOfString:"=" withString:"%"
return (theString's stringByReplacingPercentEscapesUsingEncoding:(current application's NSUTF8StringEncoding)) as text
end decodeQP:


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Mail - Extract Links
      • From: Christopher Stone <email@hidden>
References: 
 >Mail - Extract Links (From: Christopher Stone <email@hidden>)
 >Re: Mail - Extract Links (From: Shane Stanley <email@hidden>)
 >Re: Mail - Extract Links (From: Christopher Stone <email@hidden>)
 >Re: Mail - Extract Links (From: Shane Stanley <email@hidden>)
 >Re: Mail - Extract Links (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Mail - Extract Links
  • Next by Date: Re: Mail - Extract Links
  • Previous by thread: Re: Mail - Extract Links
  • Next by thread: Re: Mail - Extract Links
  • Index(es):
    • Date
    • Thread