Living With Our Rapido 963f Le Randonneur Motor Home.

Friday, 7 June 2013

How Do I Hide My Email Address Within A Link On My Blogger Website?

Following on from my last post, I wanted to include a contact email address for my readers to use, within the main body of my website, while minimizing the risk that I would be inundated by unwanted emails.

It is of course easy to just type your email address into the text of your website, so your readers can contact you. It is also foolish, as there are some unscrupulous internet users out there who trawl websites using little pieces of software, or 'crawlers' to harvest email information to be sold and used by 'spammers' later. A much safer method of publishing your email address, and minimizing this risk, is to embed the address within a link, that when clicked by the reader, will activate their own email client programme, with your email address already placed in a new 'create new mail' box, ready to type and send.

As always, this information is provided without any warranty that it will work for you, and this particular tip may alter the layout of your site. So, if you are not confident in your ability to experiment, it would probably be best to leave well alone. I take no responsibility for crashed websites as a result of you trying this!

However, this is how to do it, and the code required. This example is quite straightforward. Type exactly as is, or copy and paste, but insert your own email address within the relevant place as shown:

<a href="mailto:xyz@gmail.com">Email Me</a>

This, when inserted into the web page, (which I will describe how to do later), would simply be a link 'Email Me', which, when clicked would open a 'create new mail' script on the reader's own computer with your email address already inserted. You can change the 'Email me' text to whatever you prefer. The above is the option I use on both my websites, with the phrase 'Contact Us'.

If preferred, but slightly more involved. Rather than a text instruction link, you could use an image link, such as an envelope for example. To do this, you first have to upload your own image onto an image hosting website such as Google's Picasa, Photo Bucket or Flikr - your choice. Once the image is on there, make sure it will have public visibility by changing privacy settings in its properties as necessary. Then you will need the link to that image on it's host site. In Picasa, that information is on the right of the screen under 'Links to this photo'. The image I will provide as an example has been provided for free web use to me by Stuart Miles at FreeDigitalPhotos.net.


For the purpose of this example, say the link address to my photo is:

http://picasaweb.google.com/lh/photo/xxxxxxxxxxx-xxxxxxxxxx?feat=directlink

If we are to use the email address xyz@gmail.com then the code to use this image as an email link would be as follows:

<a href="mailto:xyz@gmail.com"><img src="http://picasaweb.google.com/lh/photo/xxxxxxxxxxx-xxxxxxxxxx?feat=directlink" alt="Email me" width="100" height="100" border="0" /></a>

The height and width settings dictate the size of your icon, and can be adjusted as required.

Next, this code has to be placed within the layout page of your Blogger website. To do this, sign in to the Blogger dashboard, and go to 'Layout'. Here you will have the opportunity to 'add a page element, or gadget as they now call it', which you will have probably done before, whilst setting up your site. Choose the one which will give you the opportunity to use html/javascript within it, place your own code, modified from above, into it, and save the changes. The new 'widget' can then be moved around the layout page by clicking and 'dragging', to place the link wherever is best suited to you, saving the changes again. Once published, you can try it for yourself to see if it opens up your own email client programme.

And that is how an email address can be added to your blog, while minimizing the risk of receiving unwanted contacts.
  

No comments:

Post a Comment

I appreciate your comment, but anonymous ones or those containing promotional links will not be published.