Site news: New mail link

by Volker Weber

tellafriend.png

I just added a little function that many regulars might miss: You can now mail a link to any post with your own mail client. I chose not to use a form based solution and went with a mailto link. Please comment if you have a client that does not pick up both a subject and body.

Comments

That's awsome. How many times have I; right-click, Properties, select, copy, paste.....

Tim Latta, 2004-10-04

Great idea. Did you use PHP?

Thomas, 2004-10-04

Something that might be of interest to Safari users is adding a javascript bookmarklet to provide 'mailto' functionality for any current browser page.

Add a bookmark, assigning a name of your choice, such as 'mailto' or 'send link'. Set the URL portion of the bookmark to the following (my bookmark is displayed in the bookmarks bar, for convenience):

javascript:location.href='mailto:?SUBJECT='+document.title+'&BODY='+escape(location.href)

Selecting this bookmark will now create a new mail message using the default mail client, with the message subject set to the current page title, and the first line in the message body set to the current page URL. This technique will work in any javascript-enabled browser, on any platform.

David Richardson, 2004-10-04

Very clever David.
The script works very well for me. Thank you

Pieterjan, 2004-10-04

Jetzt fehlt nur noch ein "send this via iChat" (oder alternativ auch AIM) link. ;-)

Stefan Weigand, 2004-10-04

gute idee. hab ich auch gleich mal eingebaut.

This is a really neat feature.

Any objection if I add something like this to BlogSphere?

Declan Lynch, 2004-10-04

Thanks, Declan. Objections? Of course not!

Volker Weber, 2004-10-04

This new addition broke your XHTML validation. I think a simple <amp; or two can straighten it out, though. Cool idea! I may also st-, er, borrow it.

Jeff, 2004-10-04

Very nice.

I'd kinda lke to borrow this as well, if that's ok.

I also, added David's bookmarklet idea to my browser, very handy. However, I wrote it as:
"javascript:void(location.href='mailto:?SUBJECT='+document.title+'&BODY='+escape(location.href))"
with the void() around to prevent it from writing to my window.

Thanks, Andrew

Andrew Barker, 2004-10-04

Thanks, Jeff. I did not validate while I should have. You were right: Putting amp; behind the & solved the issue.

Andrew, be my guest. The more people put this on their sites, the more useful it gets. If readers expect to find it the will look around and use it.

Volker Weber, 2004-10-04

Since nobody commented yet about a client that doesn't pick it up:

Browsers.

Not really my problem as I don't use webmail, but this won't work for anyone who uses web based e-mail. Be it in an Internet-Cafe, be it at work if they don't want to send it via their company account, be it because they are at someone elses PC.

You state in your post that it will use the e-mail client, but it's not made clear in the link for every post. Plenty of opportunity for confusion.

And some nitpicking: Your link states "Mail this page". That's wrong, it doesn't send the page (which I would expect with that wording, sending the full text entry), it only sends a link.

Armin, 2004-10-04

Thanks for the feedback, Armin.

I know it does not work with browsers. It might actually work with GMail-Helper but I have not tested.

"Plenty of opportunity" might be a bit blown out of proportion, though.

And finally, yes, I know I am not sending the page. That won't work in a mailto-Link because the URL would be too large. I contemplated sending the first 10 words but decided against that. When I wrote this post, there was not "Mail this page" on the individual archive page. Only the front page and the 30 days archive had them. I might drop "page" to make it look like "Mail this" from the front page, if that helps you.

Volker Weber, 2004-10-04

OK, I exaggerated a bit, especially as most of your readers probably do have their own e-mail client. I'm not a great friend of mailto-links though, in particular the type where they are used with a form. I think I must have spent too much time in the SelfHTML Forum a while ago.

And I haven't tested with The Bat! yet, which I use at home ;-)

In regards to the "mail this page", this was just some nitpicking and may be should have had a smiley. I personally don't really mind what it says, it's just something I noticed. If others have the same expectation from this link description it might disappoint a few people though ;-)

Armin, 2004-10-04

Deceptively simple. And done within one or two minutes in Movable Type. I wonder why I never thought of this before.... Thanks.

Horst, 2004-10-04

Horst, Columbus' egg comes to mind. I quickly stole your "Tell a friend" wording which might satisfy Armin's nitpicking. :-)

Volker Weber, 2004-10-04

Great feature! But TheBat! does not handle the mailto-link properly. It adds to the To: field, to the Subject: field and the body stays blank. Any ideas? Thanks!

Joerg Richter, 2004-10-04

I'd reconsider the text you add to the body. "Here is a story that might interest you" resembles those standard virus mails. Inserting just the link might be enough.

And changing the title to "Mail the address of this entry to a friend" might solve Armins quest.

Oliver Regelmann, 2004-10-04

Joerg was quicker than me, but this doesn't work at all with The Bat!:

I've got "?subject=vowe" (without the quotes) in my To: field. The subject just reads "vowe" and nothing in the body (well, apart from "Hi ?subject=vowe", because of the macro I use for the salutation).

As far as I know this isn't a standard anyway (it certainly isn't defined in HTML), so it's bound to break with at least a few e-mail clients.

Armin, 2004-10-04

OK, Ladies, let me clarify.

You don't need to think for me. This solution might be broken for some clients, or it might look like a spam message. I want you to test it, because there are a lot of people copying the idea. My spam filter does not flag the message. We also have established that The Bat cannot handle this particular URL, and I happen to know that Notes 4.x won't catch subject and body and Notes 5.x might drop the body. I also know that Mail.app, Thunderbird and Notes 6.x work OK.

How about Outlook and Outlook Express? Mozilla Mail? If we got all those I can live with the few clients that can't handle it. I am not going for a 100%-solution.

Volker Weber, 2004-10-04

From what I can remember Outlook did work as intended ;-)

Armin, 2004-10-04

Works also with Mozilla Mail (1.7.3)

Oliver Regelmann, 2004-10-04

Old vowe.net archive pages

I explain difficult concepts in simple ways. For free, and for money. Clue procurement and bullshit detection.

vowe

Paypal vowe