A smarter solution to Mail’s hyperlink woes

BrokenchainlinkAs everyone knows, Mail has an annoying habit of formatting hyperlinks so that they “break” when viewed in many other email clients.

Rachel Blackman has done Mail.app users a favour by creating a Mac OS X service that streamlines the process of solving the problem by using a service like TinyURL to create short, unbreakable hyperlinks.

Rachel’s “Shrink URL” service does the heavy lifting for you. It takes any highlighted URL in any editable Mac OS X text field, queries TinyURL and returns the shrunken URL, ready for emailing.

So, all I have to do after installing the service and restarting is highlight the URL:

Tinyurl Before

Press the service’s shortcut key (⇧⌘T) and, hey presto, the shrunk URL is there:

Tinyurl After

That’s even slicker than the browser bookmarklet TinyURL provides.

You can get the service from Rachel’s web site and ask your questions or make suggestions on her forums .

She has also made the source code available and says that “anyone who finds the shrinkURL code useful for other things is welcome to it.”mail.app, apple mail, delsp=yes, broken hyperlinks, services, tinyurl, plugins

Similar Posts:

Tags: , , , , ,

13 Responses to “A smarter solution to Mail’s hyperlink woes”

  1. Jamie Phelps says:

    I read a tip somewhere (can’t remember the source) that suggested just enclosing the URL in will preserve it. It has worked for me without a hitch so far.

  2. dave says:

    this little service script is wonderful – beyond just using it for email, it’s also great for use inside a browser when you’re inside a forum or blog posting like this one, you simply highlight the url in the browser bar and then hit the service and it converts into the tinyurl instantly in the same line (allowing for you to doublecheck if you’re paranoid by simply hitting return key)…for this post, for example, i just highlight the full url and hit the service and get: http://tinyurl.com/2eevg7 (took about 1 second to process, literally)

  3. Jonathan Poh says:

    I found a Safari plugin called SafariScript which adds a script menu to Safari, and one of the applescripts on the developer’s site is “TinyURL to clipboard”. The best thing is you can add your own keyboard shortcut to the scripts so I’ve assigned cmd-shift-C to copy the current page’s TinyURL which I can then paste into emails. Obviously this only works in Safari, unlike a systemwide service, but I’ve found that the use of Services can be quite slow.

  4. Rachel Blackman says:

    Hrm. It wouldn’t be terribly difficult to make a variant on the service (or rather, a ‘Shrink URL to Clipboard’ service in the same service bundle) that worked in read-only fields by saving the generated TinyURL to the clipboard, instead of pasting it back in to the origin textfield.

    Would people find that useful? It’d be something like 6 minutes of work, literally.

  5. rusto says:

    Jamie, I saw the hint to enclose long URLS in &#60 and &#62 (the greater than and less than symbols) in this macosxhints.com hint. (btw, I got the &#60 and &#62 to display in this comment by using the HTML ASCII codes for the symbols)

  6. rusto says:

    Rats, although the symbols showed up ok in the live preview, the comment got schmargled anyway.

  7. Errol Sayre says:

    Please note that this software’s installer puts the file in /System/Library/Services rather than /Library/Services or ~/Library/Services

    This is not “good behavior” for a Mac OS X installer package.

  8. Rachel Blackman says:

    Wow, this got blogged around more than I expected, having hit TUAW as well, now. Anyway, I’ve tossed out a quick new release, v0.2, which has ‘Shrink URL to Clipboard’ added as discussed above.

    Have at. :)

  9. Dan Warne says:

    Sorry for the blog spam :-)

    I have created a campaign to encourage Apple to fix this irritating issue with Mail. My blog post has a cut-and-pasteable Apple Bug Report.

    http://danwarne.com/the-campaign-to-convince-apple-to-fix-its-annoying-apple-mail-url-breakage-bug/#more-165

  10. Dave Peterson says:

    Not sure if this is the same issue – but my problem is with links within our office network.

    I control-click the text, select Edit Link… and enter afp://192.168.1.2/Resource/Green Resources/5. Outreach/
    …but, the link will only open Resource (and smb://, just doesn’t seem to work at all)

    The second issue is the nuisance of having to enter the protocol and server IP address – the Microsoft hyperlink browsing is much friendlier.

    Does anyone know how to create intra-network hyperlinks (is that the correct terminology – I mean not web links!) in OSX Mail?

  11. Dave Peterson says:

    btw, ftm, this site is outstanding.

  12. Christian says:

    I discovered that with Safari 3 the script does not function anymore. Is there a solution already?

  13. Jamie Phelps says:

    Looks as though WordPress borked my tip. That should have said to enclose the url in < >

Leave a Reply