GmailThis! has to be one of the most useful bookmarklet’s I have in my browser toolbar. It let’s me open a Gmail compose window with the Subject line and the email body with the URL of the website I am currently at, already filled in.This makes it so easy to email anyone an email with just the link or send an email with the link in context already pre-filled for you. If you do this a lot, you can imagine how much time this will save you from not having to open up Gmail, compose an email, go back to the site you were at and copy the url, fill in the subject line and then paste the link to the website. All this happens with a click on this bookmarklet.
How do I use this?
- Drag
to your browser bookmarks toolbar.
- Make sure you are logged in to Gmail already
- Click on ‘GmailThis!’ bookmarklet you just created to send this post to someone you know.
Here is a video showing how to use this:
How to use GmailThis!
Tips & Tweaks
I have to thank Daniel Mertens for asking this question in the comments in my post on Top Greasemonkey scripts for Gmail 2.0. He asked me if there was a way to have separate buttons with the ‘to’ address filled in with frequently used email addresses. I didn’t know of a Greasemonkey Script that did this but figured I could tweak the GmailThis! script to do just that.
It is a very simple tweak and those who are familiar with tweaking javascript would have no trouble following this. And you probably already know how to do this.
For those who are new to it, I will try to make it as straight forward as possible and if you break it you can always start over with a fresh copy and try again.
A Look inside GmailThis!
Let’s take a look at the javascript code that makes up the bookmarklet. You can get this code by right-clicking on the bookmark and choose Properties. You will find this code in the ‘Location’ field.
Does it make your head spin? No worries. You can see in the picture where to grab this code.
Let’s look at the part that we are interested in changing.
that’s the part that adds the Url of the webpage you are in to the body of the email.
A few parameters you can add to autofill are ‘to’, ‘cc’, & ‘bcc’. For eg: if you want to create a bookmarklet to email your wife with the link and subject autofilled, you would add this string to the above bookmarklet:
‘&to=’ + escape(’yourwifesemail@web.com’) +
This is what the whole script will look like with the above code inserted:
That’s it!
You create copies of this bookmarklet, rename it and then change the code with the new email updated for every script to create multiple bookmarklets, each for your frequent contact.
GmailThis! for hosted Google Apps
While looking around to see if someone has already posted about this, I came across a thread in Google Groups which showed how you can change the above script so it works with Gmail for your hosted Google Apps.
If you replace the [MYDOMAIN.COM] with your own website url, this bookmarklet should work for your Google Apps Gmail. I haven’t tested this bit but the thread seems to suggest it should work.
If there is any better way of doing this, I would love to hear it in the comments.
GmailThis! Script Credit: Doug
GmailThis! for hosted Google Apps Credit: Google Groups thread
Update: Apparently, I can’t add javascript code displayed in posts just with the <code> tag. I have resorted to doing screenshots instead and I have to find a way to display actual code in the future. If you know how, I would love to learn how from you. In fact, I am going to ask Doug as he is displaying it right now in his post. Not sure if he uses WordPress though.
Wow, a very clear explanation. I have a similar bookmarklet for my blog, but I think this one could prove even more useful since I often send email links to myself to keep track of them (del.icio.us isn’t for everyone).
B2evolution gives me the same problem with javascript in posts. Since you’re using WordPress, I can’t really help you that much but if you can get support for the iframe tag you can insert practically anything into a post without having to enable a bunch of separate tags. This post is an example of where I took that approach:
http://freesite.iblogger.org/index.php/2008/01/25/my_timelines_widget_of_the_week
There are drawbacks to this approach, however. That one guy still using netscape 2.0 won’t be able to see the iframe 🙂
Very detailed post!
Now I just need to get some friends so I have someone to e-mail!
Kyle Eslick’s last blog post..Looking Back Over The Internet in 1996
Thanks Kyle! You could always add me and email me. 😉
Troy, sorry I just rescued your comment from Akismet, again. For some reason Akismet (WordPress’s spam blocker) keeps throwing yoru cmment in the spam folder. No worries though, since you comment here regularly I check it often these days.
Glad you liked this tweak. Honestly, I am finding this useful myself but didn’t occur to me to do this until a reader asked me how it can be done! May be I should have a weekly ‘Reader Question’ column here and try to hit a problem we all face and try to find a solution together here. That might be fun.
There seems to be a couple of WP plugins out there but none to my liking yet. I will look over your post and see if that is something I can use. Thanks for the link! 🙂
I don’t know what to do about my comments ending up in spam… they’re not particularly short or full of links. One thought, though, I’ve looked everywhere on your blog to create an account and I don’t see anywhere. If I could create an account, it seems less likely that I’d be marked as spam. Then again, I’m probably just missing the link.
Maybe Troy is taken to be Trojan by Akismet 😆
Using code tags,in the code edit window (while writing a page or post) makes the code function as it normally would! Instead type out the code in the Rich Text Editor of WordPress and it would show as it is.
Read the end of this post where I write HTML in text format without using the code tags anywhere.
Regards.
Abhinav Sood’s last blog post..How to Conquer Blogger’s Block
K,
Nice post. I use the Preserve Code Formatting plugin. The description:
Not 100% sure that it works for JavaScript, but I think it does.
Stephen Cronin’s last blog post..WordPress Plugin IFrameWidgets 1.0 Released
Abinav, that’s a good one! 😉 I think Javascript might be an exception to that. In fact, IE had no problem displaying the script but Firefox looked like it was trying to execute it.
Stephen, thanks for the heads up. I will check that plugin out. I don’t do a lot of code posts here but next time I do, I am going to do it right. 🙂
Congrats on releasing the iFrame Widgets plugin!
Creating an account here is agreat idea, troy! Here is a link to register for an account. It’s not the links but I wonder if your site or the ip range is flagged in Akismet for some reason. It could be a mistake too. I will check WP forums too to see if there is a way to manually whitelist an IP. Cheers and thanks for the continued support! 🙂
GMailThis is one of those fantastic simple ideas that makes you slap your head and say Why didn’t I think. Really cool thing.
Great Addon.
Thanks For Sharing.
Regards
Jenney Mac
He utilizado siempre el gmail, él soy el mejor.