A smarter solution to Mail’s hyperlink woes
As 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:

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

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.”
Similar Posts:
- Broken Hyperlinks – Work-around
- Complicated solution to Mail.app’s broken hyperlinks
- toread: Email yourself web pages
- Add a “Gmail this” bookmarklet to your web browser
- Hacking Yojimbo bookmarklets for flags
Tags: Apple Mail, broken hyperlinks, mail.app, plugins, Services, tinyURL

April 5th, 2007 at 4:17 am
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.
April 5th, 2007 at 8:24 am
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)
April 5th, 2007 at 1:55 pm
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.
April 5th, 2007 at 5:40 pm
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.
April 5th, 2007 at 10:03 pm
Jamie, I saw the hint to enclose long URLS in < and > (the greater than and less than symbols) in this macosxhints.com hint. (btw, I got the < and > to display in this comment by using the HTML ASCII codes for the symbols)
April 5th, 2007 at 10:04 pm
Rats, although the symbols showed up ok in the live preview, the comment got schmargled anyway.
April 6th, 2007 at 1:12 am
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.
April 6th, 2007 at 8:15 am
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. :)
April 10th, 2007 at 9:59 pm
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
April 28th, 2007 at 11:04 am
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?
April 28th, 2007 at 11:05 am
btw, ftm, this site is outstanding.
July 8th, 2007 at 1:29 am
I discovered that with Safari 3 the script does not function anymore. Is there a solution already?
July 10th, 2007 at 10:05 am
Looks as though WordPress borked my tip. That should have said to enclose the url in < >