Use The Gmail App To Share Links From Mobile Safari [iOS Tips]

share via Gmail app

Mobile Safari has a great sharing feature, letting you send a web page to anyone via iMessage, Twitter, Facebook, or email. The bummer thing is, though, that if you hit Mail, your iPhone will wrest control from you and make you send via the built-in iOS Mail App.

But you don’t want to use Mail. You prefer the Gmail app, right? Of course you do. How the heck, then, can you send that adorable picture of a cute pug puppy via email using the Gmail app? With a secret bookmark, of course.

Here’s how.

First, launch Safari, and load a webpage. This one is fine. Now, tap on the Share button at the bottom of the screen, the icon that looks like a square with a curved arrow pointing up and out to the right. Tap on Bookmark, and then hit the X to delete whatever page title is auto-populated there. Type in something like Send To Gmail, then replace the URL in the next box down with the following code. I recommend you copying and pasting it to make sure it’s right, and all one line.

javascript:window.location='googlegmail:///co?subject='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(location.href);

Hit Save at the top to get out of the bookmark creation screen. You’ll end up back in Safari.

Now, whenever you’re humming along the information superhighway using your iOS device and hit the Share button at the bottom, you just tap on the Bookmarks icon at the bottom instead of the Mail button, select Send to Gmail, and–if your Gmail app is running in the background–set up an email to send with the URL of the webpage you wanted to share and a subject that’s set to the title of that same webpage. Slick, huh?

You might get a dialog badge like the one in the screenshot above, but that’s ok. Hit the Open button there and you’ll go right to Gmail on your iPhone. It works on the iPad and iPod touch, as well.

  • Breadfan

    I’m not able to edit the text in the URL box. It’s gray & I can’t click anywhere in that box.

  • mk1

    NEVER MIND — I had a bad character in my javascript. Working, now!

    Is it possible to modify that javascript so that the link that I want to send ends up in the BODY of the email, rather than as an ATTACHMENT to the email? I’m sending to Toodledo, and cannot accept attachments.

About the author

Rob LeFebvreAnchorage, Alaska-based freelance writer and editor Rob LeFebvre is Cult of Mac's Culture Editor. He has contributed to various tech, gaming and iOS sites, including 148Apps, VentureBeat, and Paste Magazine. Feel free to find Rob on Twitter @roblef

(sorry, you need Javascript to see this e-mail address)| Read more posts by .

Posted in iOS, Tips & Tricks | Tagged: , , , , , |