Tuesday, April 1, 2008

Interesting 30-second Snippet for Emailing Websites to Friends

So, one of my co-founders was telling me today about a startup out there that basically is del.icio.us but designed for sending articles to your friends. I realized that I could implement 95% of the "sending articles to your friends" functionality in 30 seconds. The code:

<a href="javascript:location.href='mailto:?subject=Check Out: \'' + document.title + '\'&body=Thought you might like this: ' + window.location.href;">Send to Friends</a>

It's just a Del.icio.us-style bookmarklet that opens your mail client with the current page title in the subject and the link to the current page in the body. Simple, clean, done. Now I can just click that when I want to email a page I'm on to friends.

For simplicity, you can drag this link to your bookmarks bar to add the feature yourself.

E-mail to Friends