We all know that when you compose an email in Gmail, any url that you copy-paste or type gets converted into a hyper-link.

Eg: Plain text - www.google.com - will become - www.google.com.

Have you wondered if we can prevent this from happening??
If you are thinking why would you ever need to prevent it, well let me tell you why I needed it.

Imagine you are building a website for your clients and there is a url from Google Alerts which the clients do not understand.

For example, try writing an email explaining how the following url is formed and what is important for the client:

http://www.example.com/url?rct=j&sa=t&url=https://www.client-website.com/articles/some-article/&ct=ga&cd=XYZ&usg=ABC

###Here is what I wanted to do in the email:

  • Write the URL as:
    http://www.example.com/url?rct=j&sa=t&url=https://www.client-website.com/articles/some-article/&ct=ga&cd=XYZ&usg=ABC
  • And explain what's the significance of the url part in grey and what's the significance of that in green.
  • I did that using the `Formatting options` while composing the email.

But when I hit Send...

###This is what google email parser did:



####I looked at all the settings in Gmail to see if we can turn off auto link. I found a setting to enable Undo send for 30 seconds (Useful for next time), but nothing related to auto links!!.

####Now I had to figure out a Hack to do this ! Which I did ! Here is how I did it …

  • Write the url and use Formatting options to make it look the way you want.

    Gmail Formatting Options

  • Open Chrome developer tools OR Firebug for Firefox users (IE Users - Download better browser!). Inspect the colorful/formatted url in the email.

    Inspect gmail url

  • In the Chrome dev tools, make the following modifications by using Edit as html option.

    Edit as html option


    • Enclose http:// into a span tag.Like this <span>http://</span>

      Before Edit as html before


      After Edit as html after


    • Similarly, Enclose www. into a span tag. Like this <span>www.</span>



You are good to hit Send Send...

And here is my inbox with the colorful/formatted URL as I wanted:

Email in Inbox



##Thank you.. Happy Hacking …

comments powered by Disqus