Apr 20, 2006

Broken “mailto:” links in Gmail

You know how you can use "mailto:" in a hyperlink to open up someone’s email application? People do it a lot when they want to make it easy for someone to reply to them (such as from an HTML email).

Example 1:
<a href="mailto:me@example.com">Email me</a>

Some of you probably know that you can add a subject line to that code with:

Example 2:
<a href="mailto:me@example.com?subject=This is a subject line">Email me</a>

And then you can even add a message to the BODY of that email with:

Example 3:
<a href="mailto:me@example.com?subject=This is a subject line&body=Here’s some text for the body of the message.">Email me</a>

Pretty neat, huh? You can even use this as a quick trick for "forward this to a friend" in your emails.

Well, Example 3, where you add a message to the body of the email, doesn’t work in Google’s Gmail. The entire hyperlink seems to be erased, leaving nothing but un-clickable text. Examples 1 and 2 work fine in Gmail. You can use mailto: links with subjects embedded in them, but not the body.

Yeah, sort of an obscure HTML email tip, but that’s exactly what this blog is for! A big thanks to the folks at GoodScreenMedia for pointing this out to us.